public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-9043] [Ada] Adjust latest change for ELF platforms
@ 2021-09-30 11:48 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2021-09-30 11:48 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d1ee1a0fe6d7772d46af972e5d126e3f6c74b457

commit r11-9043-gd1ee1a0fe6d7772d46af972e5d126e3f6c74b457
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Sat Jun 26 20:50:58 2021 +0200

    [Ada] Adjust latest change for ELF platforms
    
    gcc/ada/
    
            * libgnat/s-objrea.adb (Get_Load_Address): Return 0 for ELF.

Diff:
---
 gcc/ada/libgnat/s-objrea.adb | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/gcc/ada/libgnat/s-objrea.adb b/gcc/ada/libgnat/s-objrea.adb
index 2bd69292331..b6a87a20dd3 100644
--- a/gcc/ada/libgnat/s-objrea.adb
+++ b/gcc/ada/libgnat/s-objrea.adb
@@ -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;
 
    -----------------


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-30 11:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 11:48 [gcc r11-9043] [Ada] Adjust latest change for ELF platforms Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).