[PATCH] D84825: [release/11.x only][ELF] Change tombstone value -1 to 0

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 21:57:29 PDT 2020


MaskRay created this revision.
MaskRay added reviewers: aprantl, avl, dblaikie, echristo, grimar, hans, JDevlieghere, jhenderson, probinson, psmith.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
MaskRay requested review of this revision.

http://lists.llvm.org/pipermail/llvm-dev/2020-July/143482.html

The tombstone value -1 in .debug_line caused problems to lldb (fixed by D83957 <https://reviews.llvm.org/D83957>;
will be included in 11.0.0) and breakpad (fixed by
https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2321300 )

Using 0 in .debug_line make linked images not confused by lldb<=10 and
potentially other DWARF consumers.

For other .debug_*, there is not an agreement that using 0 is necessary.
I disagree but don't care about the resolution anyway so I give up, and use
0 for all other .debug_*

- .debug_ranges & .debug_loc: -2 (lld<11: 0+addend)
- .debug_*: 0                    (lld<11: 0+addend, lld HEAD: -1)

To restore lld HEAD behavior:

  -z 'dead-reloc-in-nonalloc=.debug_loc=0xfffffffffffffffe'
  -z 'dead-reloc-in-nonalloc=.debug_ranges=0xfffffffffffffffe'
  -z 'dead-reloc-in-nonalloc=.debug_*=0xffffffffffffffff'


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84825

Files:
  lld/ELF/InputSection.cpp
  lld/test/ELF/dead-reloc-in-nonalloc.s
  lld/test/ELF/debug-dead-reloc-32.s
  lld/test/ELF/debug-dead-reloc-icf.s
  lld/test/ELF/debug-dead-reloc-tls.s
  lld/test/ELF/debug-dead-reloc.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84825.281469.patch
Type: text/x-patch
Size: 4689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200729/a0a59c98/attachment.bin>


More information about the llvm-commits mailing list