[lld] [llvm] [Object][Wasm] Use file offset for section addresses in linked wasm files (PR #80529)
Derek Schuff via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 08:01:19 PST 2024
================
@@ -1366,8 +1375,9 @@ static SymbolInfoTy createDummySymbolInfo(const ObjectFile &Obj,
uint8_t Type) {
if (Obj.isXCOFF() && (SymbolDescription || TracebackTable))
return SymbolInfoTy(std::nullopt, Addr, Name, std::nullopt, false);
- else
- return SymbolInfoTy(Addr, Name, Type);
+ if (Obj.isWasm())
+ return SymbolInfoTy(Addr, Name, wasm::WASM_SYMBOL_TYPE_SECTION);
----------------
dschuff wrote:
It doesn't actually matter what the symbol kind is, it just has to be distinguishable from a regular function symbol in WebAssemblyDisassembler.cpp. Its address is the beginning of the section so it seemed reasonable to call it a section symbol, but we could come up with something else; perhaps a dummy symbol type or something else on the SymbolInfoTy object.
https://github.com/llvm/llvm-project/pull/80529
More information about the llvm-commits
mailing list