[PATCH] D39493: [ELF] Fix DT_MIPS_LOCAL_GOTNO value when using linker scripts to change section sizes

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 00:04:46 PST 2017


ruiu added inline comments.


================
Comment at: ELF/SyntheticSections.cpp:1169
     case Entry::PlainInt:
-      P->d_un.d_val = E.Val;
+      if (Config->EMachine == EM_MIPS && E.Tag == DT_MIPS_LOCAL_GOTNO)
+        P->d_un.d_val = InX::MipsGot->getLocalEntriesNum();
----------------
I think this kind of "if (MIPS)" should be avoided. Is there any way to not add that code here? For example, can't you finalize the GOT section before this section?


https://reviews.llvm.org/D39493





More information about the llvm-commits mailing list