[RFC][PATCH v3 0/6] binutils patches to add DF_1_UNIQUE

Vivek Das Mohapatra vivek@collabora.com
Fri Jun 26 15:08:43 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 DF_1_UNIQUE flag to DT_FLAGS_1 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 a previous patch series which tagged DSOs with
a new dynamic section instead of a DT_FLAGS_1 value.

Vivek Das Mohapatra (6):
  Define a new DT_FLAGS_1 flag DF_1_UNIQUE for ld, readelf et al
  Handle DF_1_UNIQUE in ld
  Document DF_1_UNIQUE in the man page and ld help output
  Handle DF_1_UNIQUE in readelf
  Define DT_FLAGS_1 flag DF_1_UNIQUE for gold
  Implement and document DF_1_UNIQUE handling in gold

 binutils/readelf.c   | 5 +++++
 elfcpp/elfcpp.h      | 4 +++-
 gold/layout.cc       | 2 ++
 gold/options.h       | 3 +++
 include/elf/common.h | 1 +
 ld/emultempl/elf.em  | 4 ++++
 ld/ld.texi           | 7 +++++++
 ld/lexsup.c          | 2 ++
 8 files changed, 27 insertions(+), 1 deletion(-)


More information about the Binutils mailing list