mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 01:11:44 +00:00
0b8859a3e5
I started trying to fix a small issue, but this code has seen a small fix too many. The old code was fairly convoluted. Some of the issues it had: * It failed to check if a symbol difference was in the some section when converting a relocation to pcrel. * It failed to check if the relocation was already pcrel. * The pcrel value computation was wrong in some cases (relocation-pc.s) * It was missing quiet a few cases where it should not convert symbol relocations to section relocations, leaving the backends to patch it up. * It would not propagate the fact that it had changed a relocation to pcrel, requiring a quiet nasty work around in ARM. * It was missing comments. llvm-svn: 205076
30 lines
1.0 KiB
C++
30 lines
1.0 KiB
C++
//===-- MCELFObjectTargetWriter.cpp - ELF Target Writer Subclass ----------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/ADT/STLExtras.h"
|
|
#include "llvm/MC/MCELFObjectWriter.h"
|
|
#include "llvm/MC/MCExpr.h"
|
|
#include "llvm/MC/MCValue.h"
|
|
|
|
using namespace llvm;
|
|
|
|
MCELFObjectTargetWriter::MCELFObjectTargetWriter(bool Is64Bit_,
|
|
uint8_t OSABI_,
|
|
uint16_t EMachine_,
|
|
bool HasRelocationAddend_,
|
|
bool IsN64_)
|
|
: OSABI(OSABI_), EMachine(EMachine_),
|
|
HasRelocationAddend(HasRelocationAddend_), Is64Bit(Is64Bit_),
|
|
IsN64(IsN64_){
|
|
}
|
|
|
|
bool MCELFObjectTargetWriter::needsRelocateWithSymbol(unsigned Type) const {
|
|
return false;
|
|
}
|