diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2016-05-13 12:07:14 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2016-05-13 12:07:14 +0000 |
commit | e91e52671a8768e35d998ee1c482842713edd074 (patch) | |
tree | cfeeb24adb779168f701d930b4005bfc26efdd96 /llvm/lib/Target | |
parent | 6a6916ab028533e37db043ce78c012d372ecd425 (diff) | |
download | bcm5719-llvm-e91e52671a8768e35d998ee1c482842713edd074.tar.gz bcm5719-llvm-e91e52671a8768e35d998ee1c482842713edd074.zip |
[mips][ias] Work around yet another incorrect microMIPS relocation evaluation exposed by r268900.
It's not entirely clear why R_MICROMIPS_(GOT|HI16|LO16) are evaluated
incorrectly in a small number of the LNT tests at this point. However, it's not
related to the STO_MIPS_MICROMIPS issue.
At this point all the microMIPS-related changes of r268900 have been reverted.
llvm-svn: 269410
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp index a5e63856401..36112fbf550 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp @@ -502,13 +502,10 @@ bool MipsELFObjectWriter::needsRelocateWithSymbol(const MCSymbol &Sym, // are not supported yet but can be added as required. case ELF::R_MIPS_GOT16: case ELF::R_MIPS16_GOT16: - case ELF::R_MICROMIPS_GOT16: case ELF::R_MIPS_HI16: case ELF::R_MIPS16_HI16: - case ELF::R_MICROMIPS_HI16: case ELF::R_MIPS_LO16: case ELF::R_MIPS16_LO16: - case ELF::R_MICROMIPS_LO16: // FIXME: It should be safe to return false for the STO_MIPS_MICROMIPS but // we neglect to handle the adjustment to the LSB of the addend that // it causes in applyFixup() and similar. @@ -516,6 +513,13 @@ bool MipsELFObjectWriter::needsRelocateWithSymbol(const MCSymbol &Sym, return true; return false; + // FIXME: These three belong in the previous group but applyFixup() and + // similar do not get the addend correct at the moment. + case ELF::R_MICROMIPS_GOT16: + case ELF::R_MICROMIPS_HI16: + case ELF::R_MICROMIPS_LO16: + return true; + case ELF::R_MIPS_16: case ELF::R_MIPS_32: case ELF::R_MIPS_GPREL32: |