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

Vivek Das Mohapatra vivek@collabora.com
Thu Jul 9 15:29:32 GMT 2020


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



More information about the Binutils mailing list