diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-17 16:22:06 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-17 16:22:06 +0000 |
commit | f44db24e1fd948c75c87aea017646f16553d3361 (patch) | |
tree | cf2e624f47b525837a756f0a601cf301cbdf92e2 /llvm/lib/Target/SystemZ | |
parent | ad579928878bffb2ba8899e7f6e311ef8dcdccdb (diff) | |
download | bcm5719-llvm-f44db24e1fd948c75c87aea017646f16553d3361.tar.gz bcm5719-llvm-f44db24e1fd948c75c87aea017646f16553d3361.zip |
Avoid explicit relocation sorting most of the time.
These days relocations are created and stored in a deterministic way.
The order they are created is also suitable for the .o file, so we don't
need an explicit sort.
The last remaining exception is MIPS.
llvm-svn: 255902
Diffstat (limited to 'llvm/lib/Target/SystemZ')
-rw-r--r-- | llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp index 2f19127d686..ee1af023769 100644 --- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp +++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp @@ -26,8 +26,6 @@ protected: // Override MCELFObjectTargetWriter. unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const override; - void sortRelocs(const MCAssembler &Asm, - std::vector<ELFRelocationEntry> &Relocs) override; }; } // end anonymous namespace @@ -154,20 +152,6 @@ unsigned SystemZObjectWriter::GetRelocType(const MCValue &Target, } } -void SystemZObjectWriter::sortRelocs(const MCAssembler &Asm, - std::vector<ELFRelocationEntry> &Relocs) { - // This is OK for SystemZ, except for R_390_TLS_GDCALL/LDCALL relocs. - // There is typically another reloc, a R_390_PLT32DBL, on the same - // instruction. This other reloc must come *before* the GDCALL reloc, - // or else the TLS linker optimization may generate incorrect code. - for (unsigned i = 0, e = Relocs.size(); i + 1 < e; ++i) { - if ((Relocs[i + 1].Type == ELF::R_390_TLS_GDCALL || - Relocs[i + 1].Type == ELF::R_390_TLS_LDCALL) && - Relocs[i].Offset == Relocs[i + 1].Offset + 2) - std::swap(Relocs[i], Relocs[i + 1]); - } -} - MCObjectWriter *llvm::createSystemZObjectWriter(raw_pwrite_stream &OS, uint8_t OSABI) { MCELFObjectTargetWriter *MOTW = new SystemZObjectWriter(OSABI); |