[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:
Ed Maste
2014-03-03 14:27:49 +00:00
parent 6e983f35b4
commit c1e634da0c
2 changed files with 47 additions and 0 deletions

View File

@@ -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;