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

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 12:03:13 PDT 2020


dblaikie added a comment.

In D84825#2182878 <https://reviews.llvm.org/D84825#2182878>, @MaskRay wrote:

> In D84825#2182460 <https://reviews.llvm.org/D84825#2182460>, @dblaikie wrote:
>
>> Please implement a clear flag for
>>
>> - BFD semantics
>> - New (-1/-2) semantics
>>
>> And default to the BFD semantics for now.
>>
>> The change in semantics is not ready to ship by default - there are lots of DWARF consumers out there and lots of people don't update them in lock-step with their compiler.
>
> I don't know what the request is. The patch implemented:
>
> - .debug_ranges & .debug_loc: -2
> - .debug_*: 0  (GNU ld semantics)
>
> If you meant full BFD semantics:
>
> - .debug_ranges: 1
> - .debug_*: 0

Yes, that's what I meant. (though probably applying the debug_ranges workaround to debug_loc as well would be suitable but not necessary, I think)

> I also don't want to add another option like `--gnu-ld-debug-reloc-semantics` or similar.
>
> If you meant a shortcut to
>
> - -z 'dead-reloc-in-nonalloc=.debug_loc=0xfffffffffffffffe'
> - -z 'dead-reloc-in-nonalloc=.debug_ranges=0xfffffffffffffffe'
> - -z 'dead-reloc-in-nonalloc=.debug_*=0xffffffffffffffff'
>
> I don't that is necessary either. That option will be our compatibility burden. If would cause pain when we want to remove it in LLD 12 or 13.

If we continue to support a broader/more configurable flag, I'm not sure how much support burden having a narrower flag would cause.

Actually having the broad flag is concerning to me because it increases the support burden and surface area fo the linker and potentially creates far more diverse DWARF environment than existed before this change (when you could only get one of two semantics - bfds or gold/llds) making interoperability between DWARF consumers more difficult.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84825



More information about the llvm-commits mailing list