[PATCH] D74781: Wasm-ld emits invalid .debug_ranges entries for non-live symbols
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 26 14:42:12 PDT 2020
dblaikie added a comment.
In D74781#1944970 <https://reviews.llvm.org/D74781#1944970>, @sbc100 wrote:
> 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.
Hmm, what does llvm-dwarfdump -debug-loc -v print for this? I did implement DWARF loclist base address specifier support which means sometimes it'll use a base address specifier (which would be only one address) & everything would be offsets relative to that - but that's not always used.
Hmm, maybe I'm mistaken... maybe we do /always/ use base address specifiers in debug_loc now... Yep, that's it, always using them.
Sorry for the distraction & thanks for talking it through with me!
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