]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Adjust latest change for ELF platforms
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 26 Jun 2021 18:50:58 +0000 (20:50 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Thu, 30 Sep 2021 11:47:21 +0000 (13:47 +0200)
gcc/ada/

* libgnat/s-objrea.adb (Get_Load_Address): Return 0 for ELF.

gcc/ada/libgnat/s-objrea.adb

index 2bd69292331a84bd4a718389e1dfa7d80ca7c0ca..b6a87a20dd38a4605a1236b89bffd7019d1287f6 100644 (file)
@@ -1652,12 +1652,11 @@ package body System.Object_Reader is
 
    function Get_Load_Address (Obj : Object_File) return uint64 is
    begin
-      if Obj.Format in Any_PECOFF then
-         return Obj.ImageBase;
-
-      else
-         raise Format_Error with "Get_Load_Address not implemented";
-      end if;
+      case Obj.Format is
+         when ELF        => return 0;
+         when Any_PECOFF => return Obj.ImageBase;
+         when XCOFF32    => raise Format_Error;
+      end case;
    end Get_Load_Address;
 
    -----------------