[PATCH] D59649: [ELF] Improve error message for relocations to symbols defined in discarded COMDAT

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 17:01:37 PDT 2019


MaskRay marked 2 inline comments as done.
MaskRay added a comment.

In D59649#1438330 <https://reviews.llvm.org/D59649#1438330>, @smeenai wrote:

> Thank you!
>
> If I'm understanding correctly, for the case where the relocation is not in the same object file as the discarded section, we'll still get the "undefined symbol" error message. I don't know if it would be possible to enhance that case to print the "relocation against discarded section" message as well. (gold does print that message in this case; it just doesn't print the additional information about the section group signature and prevailing definition.)


`Symbol` has the `File` field but not the section index (`st_shndx`). If the relocation is not in the same object as the discarded section, we can't get the defined section easily.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D59649





More information about the llvm-commits mailing list