unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Vivek Das Mohapatra via Libc-alpha" <libc-alpha@sourceware.org>
To: vivek@etla.org, libc-alpha@sourceware.org
Subject: [RFC][PATCH 6/6] Implement and document DF_1_UNIQUE handling in gold
Date: Mon, 30 Mar 2020 18:42:07 +0100	[thread overview]
Message-ID: <b61b4c068b86edca0e9f1055dd85249b88897ea7.1585587351.git.vivek@collabora.com> (raw)
In-Reply-To: <cover.1585587351.git.vivek@collabora.com>
In-Reply-To: <cover.1585587351.git.vivek@collabora.com>

---
 gold/layout.cc | 2 ++
 gold/options.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/gold/layout.cc b/gold/layout.cc
index be437f3900..d97ac57afc 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -5351,6 +5351,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects,
     flags |= elfcpp::DF_1_NOW;
   if (parameters->options().Bgroup())
     flags |= elfcpp::DF_1_GROUP;
+  if (parameters->options().unique())
+    flags |= elfcpp::DF_1_UNIQUE;
   if (flags != 0)
     odyn->add_constant(elfcpp::DT_FLAGS_1, flags);
 }
diff --git a/gold/options.h b/gold/options.h
index b2059d984c..de151642c7 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1459,6 +1459,9 @@ class General_options
   DEFINE_bool(interpose, options::DASH_Z, '\0', false,
 	      N_("Mark object to interpose all DSOs but executable"),
 	      NULL);
+  DEFINE_bool(unique, options::DASH_Z, '\0', false,
+              N_("Mark DSO to be loaded at most once, and only in the main namespace"),
+              NULL);
   DEFINE_bool_alias(lazy, now, options::DASH_Z, '\0',
 		    N_("Mark object for lazy runtime binding"),
 		    NULL, true);
-- 
2.11.0


  parent reply	other threads:[~2020-03-30 17:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 17:42 [RFC][PATCH 0/6] binutils patches to add DT_FLAGS_1 / DF_1_UNIQUE Vivek Das Mohapatra via Libc-alpha
2020-03-30 17:42 ` [RFC][PATCH 1/6] Define a new DT_FLAGS_1 flag DF_1_UNIQUE for ld, readelf et al Vivek Das Mohapatra via Libc-alpha
2020-03-30 17:42 ` [RFC][PATCH 2/6] Handle DF_1_UNIQUE in ld Vivek Das Mohapatra via Libc-alpha
2020-03-30 17:42 ` [RFC][PATCH 3/6] Document DF_1_UNIQUE in the man page and ld help output Vivek Das Mohapatra via Libc-alpha
2020-03-30 17:42 ` [RFC][PATCH 4/6] Handle DF_1_UNIQUE in readelf Vivek Das Mohapatra via Libc-alpha
2020-03-30 17:42 ` [RFC][PATCH 5/6] Define DT_FLAGS_1 flag DF_1_UNIQUE for gold Vivek Das Mohapatra via Libc-alpha
2020-03-30 17:42 ` Vivek Das Mohapatra via Libc-alpha [this message]
2020-03-30 18:06 ` [RFC][PATCH 0/6] binutils patches to add DT_FLAGS_1 / DF_1_UNIQUE Florian Weimer
2020-03-31 12:11   ` Vivek Das Mohapatra via Libc-alpha
2020-05-29 14:00     ` Vivek Das Mohapatra via Libc-alpha
2020-05-29 16:13       ` Florian Weimer via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b61b4c068b86edca0e9f1055dd85249b88897ea7.1585587351.git.vivek@collabora.com \
    --to=libc-alpha@sourceware.org \
    --cc=vivek@collabora.com \
    --cc=vivek@etla.org \
    /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).