[PATCH] D36579: [ELF] - Do not fail when set versions for linkerscript's symbol aliases
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 13 02:19:02 PDT 2017
grimar added inline comments.
================
Comment at: ELF/Writer.cpp:801-804
+ if (!GP || !GP->isInCurrentDSO())
+ ElfSym::MipsGp = Symtab->addAbsolute<ELFT>("_gp", STV_HIDDEN, STB_LOCAL);
+ else
+ ElfSym::MipsGp = dyn_cast<DefinedRegular>(GP);
----------------
ruiu wrote:
> I don't get the meaning of this part. Gp doesn't seem to be guaranteed to be a DefinedRegular.
`!GP->isInCurrentDSO()` condition handled all other possible cases I believe except `DefinedCommon`, which looks
possible and I missed it.
Fixed.
https://reviews.llvm.org/D36579
More information about the llvm-commits
mailing list