mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-12 16:23:45 +00:00
Fix pr19645.
The fix itself is fairly simple: move getAccessVariant to MCValue so that we replace the old weak expression evaluation with the far more general EvaluateAsRelocatable. This then requires that EvaluateAsRelocatable stop when it finds a non trivial reference kind. And that in turn requires the ELF writer to look harder for weak references. Last but not least, this found a case where we were being bug by bug compatible with gas and accepting an invalid input. I reported pr19647 to track it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207920 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -82,7 +82,7 @@ static unsigned getPLTReloc(unsigned Kind) {
|
||||
unsigned SystemZObjectWriter::GetRelocType(const MCValue &Target,
|
||||
const MCFixup &Fixup,
|
||||
bool IsPCRel) const {
|
||||
MCSymbolRefExpr::VariantKind Modifier = Fixup.getAccessVariant();
|
||||
MCSymbolRefExpr::VariantKind Modifier = Target.getAccessVariant();
|
||||
unsigned Kind = Fixup.getKind();
|
||||
switch (Modifier) {
|
||||
case MCSymbolRefExpr::VK_None:
|
||||
|
||||
Reference in New Issue
Block a user