Skip to content

Commit 4c4c5d4

Browse files
authored
Emsymbolizer: Remove VMA adjustment from llvm-symbolizer call (#26665)
After llvm/llvm-project#191068 it is no longer necessary (or correct).
1 parent 2cf3138 commit 4c4c5d4

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

test/test_other.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9684,6 +9684,8 @@ def get_instr_addr(self, text, filename):
96849684

96859685
def test_emsymbolizer_srcloc(self):
96869686
'Test emsymbolizer use cases that provide src location granularity info'
9687+
self.skipTest('TODO: Re-enable when https://github.com/llvm/llvm-project/pull/191329 rolls')
9688+
96879689
def check_dwarf_loc_info(address, funcs, locs):
96889690
out = self.run_process(
96899691
[emsymbolizer, '-s', 'dwarf', 'test_dwarf.wasm', address],

tools/emsymbolizer.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,8 @@ def has_linking_section(module):
6767
return module.get_custom_section('linking') is not None
6868

6969

70-
def symbolize_address_symbolizer(module, address, is_dwarf):
71-
if is_dwarf:
72-
vma_adjust = get_codesec_offset(module)
73-
else:
74-
vma_adjust = 0
75-
cmd = [LLVM_SYMBOLIZER, '-e', module.filename, f'--adjust-vma={vma_adjust}',
76-
str(address)]
70+
def symbolize_address_symbolizer(module, address):
71+
cmd = [LLVM_SYMBOLIZER, '-e', module.filename, str(address)]
7772
if shared.DEBUG:
7873
print(f'Running {" ".join(cmd)}')
7974
out = utils.run_process(cmd, stdout=subprocess.PIPE).stdout.strip()
@@ -280,16 +275,16 @@ def print_loc(loc):
280275

281276
if ((has_debug_line_section(module) and not args.source) or
282277
'dwarf' in args.source):
283-
print_loc(symbolize_address_symbolizer(module, address, is_dwarf=True))
278+
print_loc(symbolize_address_symbolizer(module, address))
284279
elif ((get_sourceMappingURL_section(module) and not args.source) or
285280
'sourcemap' in args.source):
286281
print_loc(symbolize_address_sourcemap(module, address, args.file))
287282
elif ((has_name_section(module) and not args.source) or
288283
'names' in args.source):
289-
print_loc(symbolize_address_symbolizer(module, address, is_dwarf=False))
284+
print_loc(symbolize_address_symbolizer(module, address))
290285
elif ((has_linking_section(module) and not args.source) or
291286
'symtab' in args.source):
292-
print_loc(symbolize_address_symbolizer(module, address, is_dwarf=False))
287+
print_loc(symbolize_address_symbolizer(module, address))
293288
elif (args.source == 'symbolmap'):
294289
print_loc(symbolize_address_symbolmap(module, address, args.file))
295290
else:

0 commit comments

Comments
 (0)