[PATCH] D74781: Wasm-ld emits invalid .debug_ranges entries for non-live symbols

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 14:11:57 PDT 2020


sbc100 added a comment.

Regarding the `.debug_loc` section.   I did a quick experiment it looks like, even before this patch we get the expected output:

  test.o:	file format WASM
  
  .debug_loc contents:
  0x00000000: 
              [0x00000005, 0x00000009): DW_OP_consts +21, DW_OP_stack_value
  
  0x0000001d: 
              [0x0000000a, 0x0000000e): DW_OP_consts +7, DW_OP_stack_value

It looks like reason this works is because there is only one relocation per function here.    i.e. there are only two relocations in the above object code.   I appears the individual ranges do not themselves contain any relocations.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74781/new/

https://reviews.llvm.org/D74781





More information about the llvm-commits mailing list