public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "Vivek Das Mohapatra" <vivek@collabora.com>
Cc: Mark Wielaard <mark@klomp.org>,
	 GNU gABI gnu-gabi <gnu-gabi@sourceware.org>
Subject: Re: ABI document
Date: Mon, 21 Sep 2020 14:36:45 +0200	[thread overview]
Message-ID: <87a6xj2tnm.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2009021818280.31454@noise.cbg.collabora.co.uk> ("Vivek =?utf-8?Q?Das=C2=A0Mohapatra=22's?= message of "Wed, 2 Sep 2020 18:29:49 +0100 (BST)")

[-- Attachment #1: Type: text/plain, Size: 2182 bytes --]

* Vivek Das Mohapatra:

>> I can't tell whether the formatting is okay, and whether we need to add
>> markup (like ``) for program text.
>
> I asked and was told it was more important to get the actual
> content agreed before we worried about that (and tbh the
> content is the hard part).

Makes sense.

Prelinking should reference the documentation from the prelink utility
(attached, if we can't find another URL, we could drop this next to our
text files, or maybe in a subdirectory).

I think the interaction between PT_GNU_RELRO and PT_LOAD is that the
PT_GNU_RELO range must cover virtual addresses previously established by
PT_LOAD segments.

VER_NDX_ELIMINATE is not implemented in glibcs AFAICS, so we can't
reverse-engineer the semantics from there.

The hidden bit in vna_other is used in glibc here:

      else
        {
          /* We can match the version information or use the
             default one if it is not hidden.  */
          ElfW(Half) ndx = verstab[symidx] & 0x7fff;
          if ((map->l_versions[ndx].hash != version->hash
               || strcmp (map->l_versions[ndx].name, version->name))
              && (version->hidden || map->l_versions[ndx].hash
                  || (verstab[symidx] & 0x8000)))
            /* It's not the version we want.  */
            return NULL;
        }

I'm not entirely sure what it means, sorry.  The negated conditional
reads like this:

  (map->l_versions[ndx].hash == version->hash
   && strcmp (map->l_versions[ndx].name, version->name) == 0)
  || (!version->hidden
      && map->l_versions[ndx].hash == 0
      && (verstab[symidx] & 0x8000) == 0)

So it basically says, if the version matches *or* the lookup permits
matching an unversioned symbol, then the lookup succeeds.  I used it for
looking up the malloc symbol (which can be unversioned if interposed) in
ld.so, but I'm not sure if there are any other actual users.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill

[-- Attachment #2: prelink.pdf --]
[-- Type: application/pdf, Size: 539486 bytes --]

[-- Attachment #3: prelink.tex --]
[-- Type: application/x-tex, Size: 197978 bytes --]

  parent reply	other threads:[~2020-09-21 12:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 11:47 Florian Weimer
2020-07-29 11:53 ` Mark Wielaard
2020-07-29 12:15   ` H.J. Lu
2020-07-29 12:22     ` Florian Weimer
2020-08-14  9:51       ` Vivek Das Mohapatra
2020-08-14 10:58         ` Mark Wielaard
2020-08-14 11:33           ` Vivek Das Mohapatra
2020-08-14 15:17             ` Mark Wielaard
2020-08-27 16:52               ` Vivek Das Mohapatra
2020-08-31 12:54                 ` Florian Weimer
2020-09-02 17:29                   ` Vivek Das Mohapatra
2020-09-08 12:09                     ` Vivek Das Mohapatra
2020-09-16 13:57                       ` Vivek Das Mohapatra
2020-09-21 13:03                       ` Florian Weimer
2020-09-21 12:36                     ` Florian Weimer [this message]
2020-11-27 15:40                       ` Vivek Das Mohapatra
2020-11-30 17:36                         ` Florian Weimer
2020-12-09 16:59                           ` Vivek Das Mohapatra
2022-08-25  8:11                             ` Florian Weimer
2022-08-25 15:38                               ` Carlos O'Donell
2022-08-30 11:55                               ` Vivek Dasmohapatra
2022-08-30 12:12                                 ` Florian Weimer
2022-08-30 15:17                                   ` Vivek Dasmohapatra
2020-07-29 12:56   ` Jose E. Marchesi

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=87a6xj2tnm.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=gnu-gabi@sourceware.org \
    --cc=mark@klomp.org \
    --cc=vivek@collabora.com \
    /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).