[RFC,v4,0/6] binutils patches for DT_GNU_FLAGS_1/DF_GNU_1_UNIQUE

Message ID cover.1594308457.git.vivek@collabora.com
Headers show
Series
  • binutils patches for DT_GNU_FLAGS_1/DF_GNU_1_UNIQUE
Related show

Message

H.J. Lu via Binutils July 9, 2020, 3:29 p.m.
This patch series is in support of the glibc RTLD_SHARED work
discussed in https://sourceware.org/bugzilla/show_bug.cgi?id=22745.

It adds a DT_GNU_FLAGS_1 dynamic section and a DF_GNU_1_UNIQUE flag
which is intended to mark libraries which should implicitly be opened
as if RTLD_SHARED had been passed to dlmopen when the target namespace
is not LM_ID_BASE.

This patch series adds support for -z unique to ld, gold, and
readelf (and documents it in the help text and so forth).

It replaces previous patch series which (respectively):

 - added a DT_FLAGS_1 value (that flag space has been exhausted)
 - added a DT_GNU_UNIQUE section (whose contents were ignored)

Vivek Das Mohapatra (6):
  Define a new DT_GNU_FLAGS_1 dynamic section for ld, readelf et al
  Handle -z unique/-z nounique in ld
  Document -z unique/-z nounique in the ld man page and help output
  Handle DT_GNU_FLAGS_1 in readelf
  Define DT_GNU_FLAGS_1 and DF_GNU_1_UNIQUE for gold
  Implement and document -z unique / -z nounique handling in gold

 bfd/elflink.c        |  5 ++++-
 binutils/readelf.c   | 23 +++++++++++++++++++++++
 elfcpp/elfcpp.h      |  7 +++++++
 gold/layout.cc       |  6 ++++++
 gold/options.h       |  3 +++
 include/bfdlink.h    |  3 +++
 include/elf/common.h |  4 ++++
 ld/emultempl/elf.em  |  4 ++++
 ld/ld.texi           | 10 ++++++++++
 ld/lexsup.c          |  4 ++++
 10 files changed, 68 insertions(+), 1 deletion(-)

-- 
2.11.0

Comments

H.J. Lu via Binutils July 9, 2020, 3:34 p.m. | #1
On Thu, Jul 9, 2020 at 8:30 AM Vivek Das Mohapatra via Binutils
<binutils@sourceware.org> wrote:
>

> This patch series is in support of the glibc RTLD_SHARED work

> discussed in https://sourceware.org/bugzilla/show_bug.cgi?id=22745.

>

> It adds a DT_GNU_FLAGS_1 dynamic section and a DF_GNU_1_UNIQUE flag

> which is intended to mark libraries which should implicitly be opened

> as if RTLD_SHARED had been passed to dlmopen when the target namespace

> is not LM_ID_BASE.

>


You need to finish the DT_GNU_FLAGS_1 and DF_GNU_1_UNIQUE proposal to gnu gABI:

https://gitlab.com/x86-psABIs/Linux-ABI/-/merge_requests/1

I created the initial draft for you.  You need to finish it.

-- 
H.J.
H.J. Lu via Binutils July 9, 2020, 4:09 p.m. | #2
> You need to finish the DT_GNU_FLAGS_1 and DF_GNU_1_UNIQUE proposal to gnu gABI:

>

> https://gitlab.com/x86-psABIs/Linux-ABI/-/merge_requests/1

>

> I created the initial draft for you.  You need to finish it.


Looking at it now.
H.J. Lu via Binutils July 9, 2020, 6:05 p.m. | #3
> I created the initial draft for you.  You need to finish it.


Updated draft submitted. I have (I hope) clarified some details
of the flag without being too glibc-specific.
H.J. Lu via Binutils July 9, 2020, 7:12 p.m. | #4
On Thu, Jul 9, 2020 at 11:05 AM Vivek Das Mohapatra <vivek@collabora.com> wrote:
>

> > I created the initial draft for you.  You need to finish it.

>

> Updated draft submitted. I have (I hope) clarified some details

> of the flag without being too glibc-specific.

>


The updated proposal is at

https://gitlab.com/x86-psABIs/Linux-ABI/-/merge_requests/1

-- 
H.J.