[PATCH] D14450: [ELF2] Add mandatory .dynamic section entries on MIPS.
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 10:36:07 PST 2015
atanasyan requested changes to this revision.
This revision now requires changes to proceed.
================
Comment at: ELF/OutputSections.cpp:491
@@ -480,3 +490,3 @@
++NumEntries; // DT_PLTRELSZ
- ++NumEntries; // DT_PLTGOT
+ ++NumEntries; // DT_PLTGOT or DT_MIPS_PLTGOT
++NumEntries; // DT_PLTREL
----------------
Do you read MIPS ABI? DT_MIPS_PLTGOT is used in the non-PIC MIPS code only. PIC MIPS code uses DT_PLTGOT entry but this entry points to the .got section.
================
Comment at: ELF/OutputSections.cpp:659
@@ +658,3 @@
+ WriteVal(DT_MIPS_SYMTABNO, Out<ELFT>::DynSymTab->getNumSymbols());
+ if (const SymbolBody *B = Out<ELFT>::Got->getFirstEntry()) {
+ WriteVal(DT_MIPS_LOCAL_GOTNO, B->GotIndex);
----------------
What is the case covered by this `if` statement?
================
Comment at: ELF/OutputSections.h:121
@@ -120,2 +120,3 @@
uintX_t getEntryAddr(const SymbolBody &B) const;
+ const SymbolBody *getFirstEntry() const;
----------------
What is the meaning of the "First" here: Lazy resolver, first local entry of first global entry?
http://reviews.llvm.org/D14450
More information about the llvm-commits
mailing list