mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Fix absolute recording of differences of symbols in two sections. Reduced from ctor_dtor_count-2.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121152 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -884,6 +884,17 @@ public:
|
||||
// FIXME: Currently, these are never generated (see code below). I cannot
|
||||
// find a case where they are actually emitted.
|
||||
Type = macho::RIT_Vanilla;
|
||||
} else if (SD->getSymbol().isVariable()) {
|
||||
const MCExpr *Value = SD->getSymbol().getVariableValue();
|
||||
int64_t Res;
|
||||
bool isAbs = Value->EvaluateAsAbsolute(Res, Layout, SectionAddress);
|
||||
if (isAbs) {
|
||||
FixedValue = Res;
|
||||
return;
|
||||
} else {
|
||||
report_fatal_error("unsupported relocation of variable '" +
|
||||
SD->getSymbol().getName() + "'");
|
||||
}
|
||||
} else {
|
||||
// Check whether we need an external or internal relocation.
|
||||
if (doesSymbolRequireExternRelocation(SD)) {
|
||||
|
Reference in New Issue
Block a user