[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
Tue Apr 12 09:01:37 PDT 2016


dsanders created this revision.
dsanders added a subscriber: llvm-commits.
Herald added subscribers: sdardis, dsanders.

In theory, care must be taken to ensure that pairs of R_MIPS_(GOT|HI|LO)16
make the same decision on both relocs in the reloc pair but in practice
this isn't as hard as it sounds and only limits the complexity of the
predicate used. We handle all three with the same code to ensure their
decisions always agree with each other.

Also, the address of the symbol was previously incorrectly stated to be
irrelevant to VK_Mips_GOT, thereby preventing the replacement of the symbol
with a section and offset for this VariantKind. This is not correct since
VK_Mips_GOT refers to the GOT entry for the symbol and therefore the symbol
itself.

http://reviews.llvm.org/D19016

Files:
  lib/MC/ELFObjectWriter.cpp
  lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
  test/MC/Mips/got-rel-expr.s
  test/MC/Mips/relocation.s
  test/MC/Mips/sort-relocation-table.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19016.53413.patch
Type: text/x-patch
Size: 13326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160412/daefc29c/attachment.bin>


More information about the llvm-commits mailing list