diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2016-05-16 09:33:59 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2016-05-16 09:33:59 +0000 |
commit | a2bde88e62ac5ccffc1802f5b963189c0e4fab3c (patch) | |
tree | 007fd02863aa5c6bcf66310be26715f80ecf034c /llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp | |
parent | 57a77118bad72158d48f717a9e751f722462274d (diff) | |
download | bcm5719-llvm-a2bde88e62ac5ccffc1802f5b963189c0e4fab3c.tar.gz bcm5719-llvm-a2bde88e62ac5ccffc1802f5b963189c0e4fab3c.zip |
[mips][ias] Fix R_MICROMIPS_GOT16 evaluation and eliminate symbol for R_MICROMIPS_(GOT|HI|LO)16
Summary:
The failure r269410 worked around turned out to be caused by an incorrect
evaluation of R_MICROMIPS_GOT16 which then caused the GOT entries to be
incorrect.
This patch fixes the evaluation and reverts r269410.
Reviewers: sdardis, vkalintiris, rafael
Subscribers: rafael, dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D20242
llvm-svn: 269641
Diffstat (limited to 'llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp index 36112fbf550..a5e63856401 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp @@ -502,10 +502,13 @@ 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. @@ -513,13 +516,6 @@ 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: |