public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: libc-alpha@sourceware.org,
	 Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	 gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v2] elf: Add _dl_find_object function
Date: Fri, 26 Nov 2021 17:17:19 +0100	[thread overview]
Message-ID: <87pmqmj3hs.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20211126154611.GI2646553@tucnak> (Jakub Jelinek's message of "Fri, 26 Nov 2021 16:46:11 +0100")

* Jakub Jelinek:

> On Thu, Nov 25, 2021 at 09:35:14PM +0100, Florian Weimer wrote:
>> +struct dl_find_object
>> +{
>> +  unsigned long long int dlfo_flags;	/* Currently 0. */
>> +  void *dlfo_map_start;		/* Beginning of mapping containing address.  */
>> +  void *dlfo_map_end;		/* End of mapping.  */
>> +  struct link_map *dlfo_link_map;
>> +  void *dlfo_eh_frame;		/* Exception handling data of the object.  */
>> +# if DLFO_STRUCT_HAS_EH_DBASE
>> +  void *dlfo_eh_dbase;		/* Base address for DW_EH_PE_datarel.  */
>> +# endif
>> +# if DLFO_STRUCT_HAS_EH_COUNT
>> +  int dlfo_eh_count;		/* Number of exception handling entries.  */
>> +# endif
>> +};
>
> I must say I still don't really like these conditionally included
> fields, if in the future one needs some of them on some other architecture,
> we'd need to add another API or symbol version it etc.

That suggests to me that I should add a few __dwlfo_unused members.  And
if the fields are actually used, a future version would set a flag (in
case a zero value for the field has meaning).  We don't even have to
initialize these members today.

(Although I do not see much need for members like dbase: we are copying
a value that the link editor has computed.  It could have easily written
that to the EH segment, too.)

Thanks,
Florian


      reply	other threads:[~2021-11-26 16:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 20:35 Florian Weimer
2021-11-26 15:46 ` Jakub Jelinek
2021-11-26 16:17   ` Florian Weimer [this message]

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=87pmqmj3hs.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=libc-alpha@sourceware.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).