[PATCH] D33485: [ELF] - Do not allow -r to eat comdats.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 06:31:27 PDT 2017


>>>  static uint64_t getOutFlags(InputSectionBase *S) {
>>> +  if (Config->Relocatable)
>>> +    return S->Flags & ~SHF_COMPRESSED;
>>
>>Not really related to the patch, but do we decompress in -r? Should we?
>>Would you mind checking and opening a bug if needed?
>
>Yeah, I also noticed that place is wierd when wrote patch, will check it soon.

Returning to this - we decompress them with -r and that is consistent with bfd/gold.
I think we should. As if we have 2 objects where in both there are compressed .debug_str
sections for example, would be not clear what to do with them since we need to produce
single section in output. Decompressing both and compressing into single again does
not looks reasonable I think, so current behavior looks fine for me.

George.


More information about the llvm-commits mailing list