mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
[mips] support FK_Data_2 and FK_Data_8 to fix big-endian debug data
This fixes invalid lengths in .debug_aranges on big-endian mips64 (lengths appear to be left-shifted by 32 bits) and in .debug_loc. Differential Revision: http://llvm-reviews.chandlerc.com/D2517 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202716 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -38,6 +38,7 @@ static unsigned adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
|
||||
switch (Kind) {
|
||||
default:
|
||||
return 0;
|
||||
case FK_Data_2:
|
||||
case FK_GPRel_4:
|
||||
case FK_Data_4:
|
||||
case FK_Data_8:
|
||||
@@ -140,12 +141,15 @@ public:
|
||||
unsigned FullSize;
|
||||
|
||||
switch ((unsigned)Kind) {
|
||||
case FK_Data_2:
|
||||
case Mips::fixup_Mips_16:
|
||||
FullSize = 2;
|
||||
break;
|
||||
case FK_Data_8:
|
||||
case Mips::fixup_Mips_64:
|
||||
FullSize = 8;
|
||||
break;
|
||||
case FK_Data_4:
|
||||
default:
|
||||
FullSize = 4;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user