[PATCH] D14450: [ELF2] Add mandatory .dynamic section entries on MIPS.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 12:12:07 PST 2015


ruiu added inline comments.

================
Comment at: ELF/OutputSections.cpp:96-99
@@ +95,6 @@
+
+template <class ELFT>
+unsigned GotSection<ELFT>::getMipsLocalEntriesNum() const {
+  return Target->getGotHeaderEntriesNum();
+}
+
----------------
I don't know why you needed this function. If it's just a forwarder, why don't you call Target->getGotHeaderEntriesNum() instead of this function?

================
Comment at: ELF/OutputSections.cpp:473
@@ -462,1 +472,3 @@
   Header.sh_entsize = ELFT::Is64Bits ? 16 : 8;
+  // .dynamic section is not writable on MIPS.
+  // See "Special Section" in Chapter 4 in the following document:
----------------
Add a blank line.

================
Comment at: ELF/OutputSections.h:121
@@ -120,1 +120,3 @@
   uintX_t getEntryAddr(const SymbolBody &B) const;
+  // Returns the symbol which corresponds to the first entry of the global part
+  // of GOT on MIPS platform. It is required to fill up MIPS-specific dynamic
----------------
Add a blank line before the start of the comment.

================
Comment at: ELF/OutputSections.h:126
@@ +125,3 @@
+  const SymbolBody *getMipsFirstGlobalEntry() const;
+  // Returns the number of entries in the local part of GOT including
+  // the number of reserved entries. This method is MIPS-specific.
----------------
Ditto

================
Comment at: ELF/Target.cpp:157
@@ -156,1 +156,3 @@
 
+uint64_t TargetInfo::getVAStart() const { return Config->Shared ? 0 : VAStart; }
+
----------------
This and removal of getVAStart from Writer are good changes but not related to this patch. Please submit as a separate commit. (You don't need another pre-commit code review for that.)


http://reviews.llvm.org/D14450





More information about the llvm-commits mailing list