public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r11-9043] [Ada] Adjust latest change for ELF platforms
Date: Thu, 30 Sep 2021 11:48:08 +0000 (GMT)	[thread overview]
Message-ID: <20210930114808.191313857C59@sourceware.org> (raw)

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;
 
    -----------------


                 reply	other threads:[~2021-09-30 11:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210930114808.191313857C59@sourceware.org \
    --to=ebotcazou@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).