Explorar o código

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

git-svn-id: trunk@30188 -
Jeppe Johansen %!s(int64=10) %!d(string=hai) anos
pai
achega
52e505bff7
Modificáronse 4 ficheiros con 9 adicións e 0 borrados
  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);
           aitconst_half16bit:
             result:=2;
+          aitconst_got:
+            result:=sizeof(pint);
           aitconst_gotoff_symbol:
             result:=4;
           else

+ 2 - 0
compiler/arm/cpuelf.pas

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

+ 4 - 0
compiler/assemble.pas

@@ -1497,6 +1497,10 @@ Implementation
                        { Required for DWARF2 support under Windows }
                        ObjData.writereloc(Tai_const(hp).symofs,sizeof(longint),Objdata.SymbolRef(tai_const(hp).sym),RELOC_SECREL32);
                      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:
                      ObjData.writereloc(Tai_const(hp).symofs,sizeof(longint),Objdata.SymbolRef(tai_const(hp).sym),RELOC_GOTOFF);
                    aitconst_uleb128bit,

+ 1 - 0
compiler/ogbase.pas

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