]> 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)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 20 Sep 2021 12:31:33 +0000 (12:31 +0000)
gcc/ada/

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

gcc/ada/libgnat/s-objrea.adb

index e46c4700d921b67468a1de66758481ca954d19f4..e1bc677b6bbb1e1a7e064cc6cb5c4c77331c44d9 100644 (file)
@@ -1656,12 +1656,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;
 
    -----------------