[PATCH] D94371: [lld/mac] Implement -u flag

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 10:02:21 PST 2021


thakis added a comment.

In D94371#2493861 <https://reviews.llvm.org/D94371#2493861>, @int3 wrote:

>> Since we emit diagnostics for undefineds in Writer::scanRelocations()
>
> I've been wondering whether this is the right way to do it... in particular, we end up emitting one error message per relocation to an undefined, even if they all point to the same undefined. I made a brief attempt to scan the symbol table instead, but that creates spurious errors for things like `.globl unused_and_undefined`. I suppose we could always just dedup the symbols when scanning through the relocations though. Do you know how LLD-ELF handles this?

COFF goes through the symbol table. ELF is relocation-based (IIRC it used to not be but something moved it to be relocation based.) I made it dedup diags in D63344 <https://reviews.llvm.org/D63344> (later slightly refined in D77017 <https://reviews.llvm.org/D77017>).


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

https://reviews.llvm.org/D94371



More information about the llvm-commits mailing list