[llvm] SymbolizableOjbectFile: Distinguish between Wasm object and linked files (PR #191329)

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 08:50:56 PDT 2026


================
@@ -1,11 +1,11 @@
 # REQUIRES: webassembly-registered-target, lld
 # RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %s -o %t.o -g
-# RUN: llvm-symbolizer --basenames --output-style=GNU -e %t.o 1 2 3 4 5 6 7 8 9 10 11 12 13 | FileCheck %s
+# RUN: llvm-symbolizer --basenames --output-style=GNU -e %t.o 0 1 2 3 4 5 6 7 8 9 10 11 12 13 0x44 | FileCheck %s
 
 # This is the same test but on a linked wasm file, using file offsets rather
 # than section offsets.
 # RUN: wasm-ld %t.o -o %t.wasm --no-entry --export=foo --export=bar
-# RUN: llvm-symbolizer --basenames --output-style=GNU -e %t.wasm 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e | FileCheck %s
+# RUN: llvm-symbolizer --basenames --output-style=GNU -e %t.wasm 3 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x100 | FileCheck %s
----------------
dschuff wrote:

Updated the comments about why 3, mentioned that the code section starts at 0x41 (so the rest of the sequence is equivalent) and also adjusted so the "off the end" addresses to be also exactly equivalent.

https://github.com/llvm/llvm-project/pull/191329


More information about the llvm-commits mailing list