[PATCH] D31528: [ELF][MIPS] Multi-GOT implementation

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 8 03:58:57 PDT 2018


grimar accepted this revision.
grimar added a comment.

I think that:

1. Simon is obviously an expert in MIPS. We have probably no other good reviewers on this platform here anyways.
2. Patch has no critical stylish issues. I added few minor nits though. Anything else can be fixed after.
3. It already took really too long to progress.
4. Patch mostly affects MIPS parts of the LLD code (so it is isolated).
5. Post-commit reviews are OK in general practice.
6. It is important and desired patch for FreeBSD.

Given that. LGTM.



================
Comment at: ELF/SyntheticSections.cpp:744
 const Symbol *MipsGotSection::getFirstGlobalEntry() const {
-  return GlobalEntries.empty() ? nullptr : GlobalEntries.front().first;
+  if (!Gots.empty()) {
+    const FileGot &PrimGot = Gots.front();
----------------
Early return?

```
if (Gots.empty())
  return nullptr;
```


================
Comment at: ELF/SyntheticSections.cpp:969
+    return ElfSym::MipsGp->getVA(0);
+  return this->getVA() + Gots[*F->MipsGotIndex].StartIndex * Config->Wordsize +
+         0x7ff0;
----------------
Doesn't seem you need `this`.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D31528





More information about the llvm-commits mailing list