[PATCH] Linking of shared libraries for MIPS little-endian 32-bit target

Simon Atanasyan simon at atanasyan.com
Thu Dec 12 07:08:28 PST 2013



================
Comment at: lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp:24
@@ +23,3 @@
+  auto target = reinterpret_cast<llvm::support::ulittle32_t *>(location);
+  *target = result | *target;
+}
----------------
Rui Ueyama wrote:
> Is "|" correct? I don't know about MIPS relocation types but in COFF it's "+".
Yes, "|" is correct. By the way the same code are in the Hexagon and X86_64 ELF targets.

================
Comment at: lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp:124
@@ +123,3 @@
+      break;
+    }
+  }
----------------
Rui Ueyama wrote:
> You might want to add llvm_unreachable for other cases.
Not all MIPS relocation require GOT entries so it is ok to do nothing in this method sometimes. That is why I prefer to keep this code unchanged.


http://llvm-reviews.chandlerc.com/D2156



More information about the llvm-commits mailing list