Browse Source

* set default abi to eabi5 on arm

git-svn-id: trunk@40751 -
florian 6 years ago
parent
commit
3a8f25348b
2 changed files with 13 additions and 3 deletions
  1. 3 0
      packages/fcl-res/src/elfconsts.pp
  2. 10 3
      packages/fcl-res/src/elfsubwriter.inc

+ 3 - 0
packages/fcl-res/src/elfconsts.pp

@@ -79,6 +79,9 @@ const
   //machine-specific flags
   EF_IA_64_ABI64 = $10;  //wow, this is really a 64-bit object file!
 
+  EF_ARM_ABIMASK = $ff000000;
+  EF_ARM_ABI5    = $05000000;
+
   // riscv flags
   EF_RISCV_RVC = 1;
 

+ 10 - 3
packages/fcl-res/src/elfsubwriter.inc

@@ -441,9 +441,16 @@ begin
   {$ELSE}
   fDataAlignment:=4;
   {$ENDIF}
-  if aMachineType=EM_IA_64 then fMachineFlags:=EF_IA_64_ABI64
-  else if aMachineType=EM_RISCV then fMachineFlags:=EF_RISCV_FLOAT_ABI_DOUBLE or EF_RISCV_RVC // This is the default class for now
-  else fMachineFlags:=0;
+  case aMachineType of
+    EM_IA_64:
+      fMachineFlags:=EF_IA_64_ABI64;
+    EM_RISCV:
+      fMachineFlags:=EF_RISCV_FLOAT_ABI_DOUBLE or EF_RISCV_RVC; // This is the default class for now;
+    EM_ARM:
+      fMachineFlags:=EF_ARM_ABI5;
+    else
+      fMachineFlags:=0;
+  end;
 end;
 
 destructor _TElfSubWriter_.Destroy;