mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-18 21:24:32 -04:00
Add a hook in MCELFObjectTargetWriter to allow targets to sort relocation
entries in the relocation table before they are written out to the file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153345 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/MC/MCELFObjectWriter.h"
|
||||
|
||||
using namespace llvm;
|
||||
@@ -36,3 +37,10 @@ const MCSymbol *MCELFObjectTargetWriter::ExplicitRelSym(const MCAssembler &Asm,
|
||||
void MCELFObjectTargetWriter::adjustFixupOffset(const MCFixup &Fixup,
|
||||
uint64_t &RelocOffset) {
|
||||
}
|
||||
|
||||
void
|
||||
MCELFObjectTargetWriter::sortRelocs(const MCAssembler &Asm,
|
||||
std::vector<ELFRelocationEntry> &Relocs) {
|
||||
// Sort by the r_offset, just like gnu as does.
|
||||
array_pod_sort(Relocs.begin(), Relocs.end());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user