فهرست منبع

Fixed internal error in GOT related code for ARM internal assembler.

git-svn-id: trunk@30188 -
Jeppe Johansen 10 سال پیش
والد
کامیت
52e505bff7
4فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 2 0
      compiler/aasmtai.pas
  2. 2 0
      compiler/arm/cpuelf.pas
  3. 4 0
      compiler/assemble.pas
  4. 1 0
      compiler/ogbase.pas

+ 2 - 0
compiler/aasmtai.pas

@@ -1861,6 +1861,8 @@ implementation
             result:=LengthSleb128(value);
             result:=LengthSleb128(value);
           aitconst_half16bit:
           aitconst_half16bit:
             result:=2;
             result:=2;
+          aitconst_got:
+            result:=sizeof(pint);
           aitconst_gotoff_symbol:
           aitconst_gotoff_symbol:
             result:=4;
             result:=4;
           else
           else

+ 2 - 0
compiler/arm/cpuelf.pas

@@ -331,6 +331,8 @@ implementation
           result:=R_ARM_CALL;
           result:=R_ARM_CALL;
         RELOC_RELATIVE_CALL_THUMB:
         RELOC_RELATIVE_CALL_THUMB:
           result:=R_ARM_THM_CALL;
           result:=R_ARM_THM_CALL;
+        RELOC_GOT32:
+          result:=R_ARM_GOT_BREL;
       else
       else
         result:=0;
         result:=0;
         writeln(objrel.typ);
         writeln(objrel.typ);

+ 4 - 0
compiler/assemble.pas

@@ -1497,6 +1497,10 @@ Implementation
                        { Required for DWARF2 support under Windows }
                        { Required for DWARF2 support under Windows }
                        ObjData.writereloc(Tai_const(hp).symofs,sizeof(longint),Objdata.SymbolRef(tai_const(hp).sym),RELOC_SECREL32);
                        ObjData.writereloc(Tai_const(hp).symofs,sizeof(longint),Objdata.SymbolRef(tai_const(hp).sym),RELOC_SECREL32);
                      end;
                      end;
+{$ifdef arm}
+                   aitconst_got:
+                     ObjData.writereloc(Tai_const(hp).symofs,sizeof(longint),Objdata.SymbolRef(tai_const(hp).sym),RELOC_GOT32);
+{$endif arm}
                    aitconst_gotoff_symbol:
                    aitconst_gotoff_symbol:
                      ObjData.writereloc(Tai_const(hp).symofs,sizeof(longint),Objdata.SymbolRef(tai_const(hp).sym),RELOC_GOTOFF);
                      ObjData.writereloc(Tai_const(hp).symofs,sizeof(longint),Objdata.SymbolRef(tai_const(hp).sym),RELOC_GOTOFF);
                    aitconst_uleb128bit,
                    aitconst_uleb128bit,

+ 1 - 0
compiler/ogbase.pas

@@ -70,6 +70,7 @@ interface
          RELOC_RELATIVE_24,
          RELOC_RELATIVE_24,
          RELOC_RELATIVE_24_THUMB,
          RELOC_RELATIVE_24_THUMB,
          RELOC_RELATIVE_CALL_THUMB,
          RELOC_RELATIVE_CALL_THUMB,
+         RELOC_GOT32,
 {$endif arm}
 {$endif arm}
          { Relative relocation }
          { Relative relocation }
          RELOC_RELATIVE,
          RELOC_RELATIVE,