Gas is very inconsistent about when a relaxation/relocation is needed. Do

the right thing and stop trying to copy it. Fixes PR8944.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2011-02-16 03:25:55 +00:00
parent 169e1552e7
commit 908159b46a
6 changed files with 20 additions and 65 deletions

View File

@@ -359,13 +359,6 @@ namespace {
MCDataFragment *F,
const MCSectionData *SD);
virtual bool
IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,
const MCSymbolData &DataA,
const MCFragment &FB,
bool InSet,
bool IsPCRel) const;
virtual void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout);
virtual void WriteSection(MCAssembler &Asm,
const SectionIndexMapTy &SectionIndexMap,
@@ -1181,24 +1174,6 @@ void ELFObjectWriter::CreateMetadataSections(MCAssembler &Asm,
}
}
bool
ELFObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,
const MCSymbolData &DataA,
const MCFragment &FB,
bool InSet,
bool IsPCRel) const {
// FIXME: This is in here just to match gnu as output. If the two ends
// are in the same section, there is nothing that the linker can do to
// break it.
if (DataA.isExternal())
return false;
const MCSection &SecA = DataA.getSymbol().AliasedSymbol().getSection();
const MCSection &SecB = FB.getParent()->getSection();
// On ELF A - B is absolute if A and B are in the same section.
return &SecA == &SecB;
}
void ELFObjectWriter::CreateIndexedSections(MCAssembler &Asm,
MCAsmLayout &Layout,
GroupMapTy &GroupMap,