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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 11:40:10 PDT 2019


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: ELF/Driver.cpp:1296
         replaceSymbol<Undefined>(S, nullptr, S->getName(), STB_WEAK, S->StOther,
-                                 S->Type);
+                                 S->Type, 0);
         S->Used = Used;
----------------
grimar wrote:
> grimar wrote:
> > I would use something like `0 /*DiscardedSecIdx*/` because it is not clear what is `0`.
> > (here and below)
> Side note: Hmmm. We are not consistent. We use both /*DiscardedSecIdx*/ and /*DiscardedSecIdx=*/ forms across LLD.
Missed that case. Fixed!


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