public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
From: "Vivek Das Mohapatra" <vivek@collabora.com>
To: Michael Matz <matz@suse.de>
Cc: gnu-gabi@sourceware.org
Subject: Re: [RFC][PATCH v2 0/6] binutils patches to add DT_GNU_UNIQUE
Date: Wed, 17 Jun 2020 17:37:33 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.20.2006171718010.2022@noise.cbg.collabora.co.uk> (raw)
In-Reply-To: <alpine.LSU.2.20.2006171601340.22600@wotan.suse.de>

On Wed, 17 Jun 2020, Michael Matz wrote:

> Can you describe the purpose and semantics of the new dynamic tag in
> textual form that doesn't refer to glibc functions and terms?  I.e.
> something that we can actually discuss on this mailing list?

I can give it a shot, sure: The tricky part is that it really isn't
necessary when you don't have namespaced DSO loading. But let's
see if I can come up with something sensible.

> I mean, we could just reserve value 0x6ffffdf4 with name DT_GNU_UNIQUE in
> the GNU/Linux gABI and be done.  But it seems saner to actually document
> the intended semantics of it at the same place where it's reserved.

That seems entirely reasonable.

-------------------------------------------------------------------------

I should open by saying I originally implemented this as a new bitfield
value for the payload of DT_FLAGS_1, but was told a new DT_GNU_… section
might be more palatable/portable/less-conflict-prone.

I have no axe to grind either way, both approaches work well for me.

-------------------------------------------------------------------------

That said:

The purpose of this tag is to mark DSOs which must be loaded no more
than once by the dynamic loader.

In normal use this is never a problem as the link chain is a simple
linked list but when a partitioned loading scheme (such as the extra
namespaces available via dlmopen(3) in glibc) is present it is possible
for multiple copies of the same DSO to be resident.

For DSOs which are "fundamental" in some way (eg libc.so, libpthread.so)
the presence of a second copy can cause bizarre and difficult to debug
problems. This tag hints to the linker/loader that the DSO should be
present at most once, and requests (implicit or explicit) to load a
segregated copy of it should NOT be honoured.

  reply	other threads:[~2020-06-17 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200617135945.12716-1-vivek@collabora.com>
     [not found] ` <CAMe9rOr7PVkz1k8dAPXoJjiCjiQ32f26ZduMX6xuxbGzguG=zQ@mail.gmail.com>
2020-06-17 16:00   ` Vivek Das Mohapatra
2020-06-17 16:16     ` Michael Matz
2020-06-17 16:37       ` Vivek Das Mohapatra [this message]
2020-06-17 18:23         ` Cary Coutant
2020-06-17 19:13           ` Vivek Das Mohapatra
2020-06-26 15:12             ` [RFC][PATCH v3 0/6] binutils patches to add DF_1_UNIQUE Vivek Das Mohapatra
2020-06-26 15:29               ` H.J. Lu
     [not found]                 ` <ca72c789-f60c-2eaf-18e9-a7e59fcb0319@Oracle.COM>
     [not found]                   ` <CAMe9rOqF-zUUsCeyiT8s20bhTeVhozZtGkAD-JRrNiEOaju7jQ@mail.gmail.com>
     [not found]                     ` <8af0af5a-9fd4-2e80-1dff-ff714a15a6b2@Oracle.COM>
     [not found]                       ` <20200626173513.22arn2ihwgxudmjf@google.com>
     [not found]                         ` <CAMe9rOorOgV6wT3gHVdfK-zKp11kUVcqtBZHSSd__EdQtWvcKw@mail.gmail.com>
2020-06-26 18:34                           ` H.J. Lu

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=alpine.DEB.2.20.2006171718010.2022@noise.cbg.collabora.co.uk \
    --to=vivek@collabora.com \
    --cc=gnu-gabi@sourceware.org \
    --cc=matz@suse.de \
    /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).