mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
ARM: fail less catastrophically on invalid Windows input
Windows supports a restricted set of relocations (compared to ARM ELF). In some cases, we may end up generating an unsupported relocation. This can occur with bad input to the assembler in particular (the frontend should never generate code that cannot be compiled). Generate an error rather than just aborting. The change in the API is driven by the desire to provide a slightly more helpful message for debugging purposes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -737,8 +737,9 @@ void WinCOFFObjectWriter::RecordRelocation(
|
||||
++Reloc.Symb->Relocations;
|
||||
|
||||
Reloc.Data.VirtualAddress += Fixup.getOffset();
|
||||
Reloc.Data.Type = TargetObjectWriter->getRelocType(Target, Fixup,
|
||||
CrossSection);
|
||||
Reloc.Data.Type =
|
||||
TargetObjectWriter->getRelocType(Target, Fixup, CrossSection,
|
||||
Asm.getBackend());
|
||||
|
||||
// FIXME: Can anyone explain what this does other than adjust for the size
|
||||
// of the offset?
|
||||
|
Reference in New Issue
Block a user