[all-commits] [llvm/llvm-project] 8b0f47: [Object][Wasm] Use file offset for section address...
Derek Schuff via All-commits
all-commits at lists.llvm.org
Wed Feb 7 11:51:31 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8b0f47bfa4b6aa1bafa10261444c93aba5a2d31d
https://github.com/llvm/llvm-project/commit/8b0f47bfa4b6aa1bafa10261444c93aba5a2d31d
Author: Derek Schuff <dschuff at chromium.org>
Date: 2024-02-07 (Wed, 07 Feb 2024)
Changed paths:
M lld/test/wasm/build-id.test
M lld/test/wasm/merge-string-debug.s
M lld/test/wasm/startstop.ll
M llvm/lib/Object/WasmObjectFile.cpp
M llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
M llvm/test/tools/llvm-objdump/wasm/executable-without-symbols-debugnames.test
M llvm/test/tools/llvm-objdump/wasm/executable-without-symbols.test
M llvm/test/tools/llvm-objdump/wasm/no-codesec.test
M llvm/tools/llvm-objdump/llvm-objdump.cpp
Log Message:
-----------
[Object][Wasm] Use file offset for section addresses in linked wasm files (#80529)
Wasm has no unified virtual memory space as other object formats and
architectures do, so previously WasmObjectFile reported 0 for all
section addresses, and until 428cf71ff used section offsets for function
symbols. Now we use file offsets for function symbols, and this change
switches section addresses to do the same (in linked files). The main
result of this is that objdump now reports VMAs in section listings, and
also uses file offets rather than section offsets when disassembling
linked binaries (matching the behavior of other disassemblers and stack
traces produced by browwsers). To make this work, this PR also updates
objdump's generation of synthetics fallback symbols to match lib/Object
and also correctly plumbs symbol types for regular and dummy symbols
through to the backend to avoid needing special knowledge of address 0.
This also paves the way for generating symbols from name sections rather
than symbol tables or imports (see #76107) by allowing the
disassembler's synthetic fallback symbols match the name-section
generated symbols (in a followup PR).
More information about the All-commits
mailing list