From: Fangrui Song <maskray@google.com>
To: binutils@sourceware.org
Cc: phosek@chromium.org
Subject: ld: Change visibility of __start_* __stop_* symbols
Date: Tue, 2 Jun 2020 14:12:52 -0700 [thread overview]
Message-ID: <20200602211252.gmqrwcjfkqlys4bc@google.com> (raw)
GNU ld defined __start_*/__stop_* symbols used to be STV_HIDDEN. They
were made STV_PROTECTED by the resolution in https://sourceware.org/bugzilla/show_bug.cgi?id=21964
The rationale is that "people use dlsym to look them up."
In GCC/clang, -fvisibility=hidden can make definitions STV_HIDDEN (this
is a very good way avoid leaking internal definitions).
However, for the linker defined __start_*/__stop_* , there isn't a counterpart.
Should we have a -z option controlling the visibility?
If yes, what do you think of
-z start-stop-symbols={protected,hidden}
or simply
-z start-stop={protected,hidden}
next reply other threads:[~2020-06-02 21:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-02 21:12 Fangrui Song [this message]
2020-06-03 14:00 ` Michael Matz
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=20200602211252.gmqrwcjfkqlys4bc@google.com \
--to=maskray@google.com \
--cc=binutils@sourceware.org \
--cc=phosek@chromium.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).