mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Relocation against a symbol, instead of against section. We had some extreme
test cases where there were a lot of relocations applied relative to a large rodata section. Gas would create a symbol for each of these whereas we would be relative to the beginning of the rodata section. This change mimics what gas does. Patch by Jack Carter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1851,7 +1851,8 @@ const MCSymbol *MipsELFObjectWriter::ExplicitRelSym(const MCAssembler &Asm,
|
||||
assert(Target.getSymA() && "SymA cannot be 0.");
|
||||
const MCSymbol &Sym = Target.getSymA()->getSymbol();
|
||||
|
||||
if (Sym.getSection().getKind().isMergeable1ByteCString())
|
||||
if (Sym.getSection().getKind().isMergeableCString() ||
|
||||
Sym.getSection().getKind().isMergeableConst())
|
||||
return &Sym;
|
||||
|
||||
return NULL;
|
||||
@ -1914,4 +1915,3 @@ unsigned MipsELFObjectWriter::GetRelocType(const MCValue &Target,
|
||||
|
||||
return Type;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user