File tree Expand file tree Collapse file tree 3 files changed +4
-161
lines changed Expand file tree Collapse file tree 3 files changed +4
-161
lines changed Original file line number Diff line number Diff line change @@ -1667,18 +1667,10 @@ Expected<StringRef> WasmObjectFile::getSymbolName(DataRefImpl Symb) const {
1667
1667
Expected<uint64_t > WasmObjectFile::getSymbolAddress (DataRefImpl Symb) const {
1668
1668
auto &Sym = getWasmSymbol (Symb);
1669
1669
if (Sym.Info .Kind == wasm::WASM_SYMBOL_TYPE_FUNCTION &&
1670
- isDefinedFunctionIndex (Sym.Info .ElementIndex )) {
1671
- // For object files, use the section offset. The linker relies on this.
1672
- // For linked files, use the file offset. This behavior matches the way
1673
- // browsers print stack traces and is useful for binary size analysis.
1674
- // (see https://webassembly.github.io/spec/web-api/index.html#conventions)
1675
- uint32_t Adjustment = isRelocatableObject () || isSharedObject ()
1676
- ? 0
1677
- : Sections[CodeSection].Offset ;
1678
- return getDefinedFunction (Sym.Info .ElementIndex ).CodeSectionOffset +
1679
- Adjustment;
1680
- }
1681
- return getSymbolValue (Symb);
1670
+ isDefinedFunctionIndex (Sym.Info .ElementIndex ))
1671
+ return getDefinedFunction (Sym.Info .ElementIndex ).CodeSectionOffset ;
1672
+ else
1673
+ return getSymbolValue (Symb);
1682
1674
}
1683
1675
1684
1676
uint64_t WasmObjectFile::getWasmSymbolValue (const WasmSymbol &Sym) const {
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments