[PATCH] D19016: [mips][ias] R_MIPS_(GOT|HI|LO|PC)16 and R_MIPS_GPREL32 do not need symbols.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 03:36:44 PDT 2016


dsanders added inline comments.

================
Comment at: lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp:29
@@ +28,3 @@
+// from rewriting the relocations.
+static cl::opt<bool> AlwaysNeedSymbols(
+    "mips-relocs-always-need-symbols", cl::init(false),
----------------
rafael wrote:
> Please don't add this. 
I originally added this to preserve the intent of sort-relocation-table.s's tests but having dug further I now think that this patch exposes a bug in MipsELFObjectWriter::sortRelocs(). I don't see any mention of the relocation addend even though this is important to the HI/LO matching.

I'll look into fixing sortRelocs().


http://reviews.llvm.org/D19016





More information about the llvm-commits mailing list