mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
This patch fixes a Mips specific bug where
we need to generate a N64 compound relocation R_MIPS_GPREL_32/R_MIPS_64/R_MIPS_NONE. The bug was exposed by the SingleSourcetest case DuffsDevice.c. Contributer: Jack Carter git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172496 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -108,7 +108,13 @@ unsigned MipsELFObjectWriter::GetRelocType(const MCValue &Target,
|
||||
Type = ELF::R_MIPS_64;
|
||||
break;
|
||||
case FK_GPRel_4:
|
||||
Type = ELF::R_MIPS_GPREL32;
|
||||
if (isN64()) {
|
||||
Type = setRType((unsigned)ELF::R_MIPS_GPREL32, Type);
|
||||
Type = setRType2((unsigned)ELF::R_MIPS_64, Type);
|
||||
Type = setRType3((unsigned)ELF::R_MIPS_NONE, Type);
|
||||
}
|
||||
else
|
||||
Type = ELF::R_MIPS_GPREL32;
|
||||
break;
|
||||
case Mips::fixup_Mips_GPREL16:
|
||||
Type = ELF::R_MIPS_GPREL16;
|
||||
|
Reference in New Issue
Block a user