MCELF: Always overwrite FixedValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2010-08-27 10:38:39 +00:00
parent a87c163355
commit 95c602ade3

View File

@ -462,13 +462,13 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
uint64_t &FixedValue) {
int64_t Addend = 0;
unsigned Index = 0;
int64_t Value = Target.getConstant();
if (!Target.isAbsolute()) {
const MCSymbol *Symbol = &Target.getSymA()->getSymbol();
MCSymbolData &SD = Asm.getSymbolData(*Symbol);
const MCSymbolData *Base = Asm.getAtom(Layout, &SD);
MCFragment *F = SD.getFragment();
int64_t Value = Target.getConstant();
if (Base) {
if (F && (!Symbol->isInSection() || SD.isCommon())) {
@ -496,9 +496,10 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
return;
}
}
FixedValue = Value;
}
FixedValue = Value;
// determine the type of the relocation
bool IsPCRel = isFixupKindX86PCRel(Fixup.getKind());
unsigned Type;