From: "H.J. Lu" <hjl@lucon.org>
To: Ian Lance Taylor <iant@google.com>,
binutils@sourceware.org, richard@codesourcery.com
Subject: Re: PATCH: Check symbol type for symbol alias
Date: Fri, 20 Jul 2007 13:07:00 -0000 [thread overview]
Message-ID: <20070720125052.GA1973@lucon.org> (raw)
In-Reply-To: <87wswvv3p1.fsf@firetop.home>
On Fri, Jul 20, 2007 at 10:12:42AM +0100, Richard Sandiford wrote:
> "H.J. Lu" <hjl@lucon.org> writes:
> > Here is a patch to add a testcase and check symbol type for symbol
> > alias.
>
> In case anyone's in any doubt, this really doesn't fix my original
> problem. Although the strong symbol in the test's shared library was
> defined by the linker script, that was mostly for test convenience.
> We can still have a situation in which an object symbol "bar" in a
> shared library is overridden by an assignment "PROVIDE (bar = .);" in
> the linker script of an object being linked against the shared library.
> (And as I said in the covering note, we do handle that situation
> correctly; we use relocations against the original weak symbol instead.)
> I can adjust the testcase in the obvious way if this patch goes in.
The problem is linker creates a wrong symbol alias for a dynamic
object. We don't have a reliable way to tell if a symbol is an aliase
in a shared library. It can lead to many problems. Can we use
STT_SECTION for linker created symbols? Gabi says
STT_SECTION
The symbol is associated with a section. Symbol table entries of
this type exist primarily for relocation and normally have STB_LOCAL
binding.
It doesn't forbid STB_GLOBAL binding. At least, we won't make a weak
symbol an alias of linker created symbols.
H.J.
next prev parent reply other threads:[~2007-07-20 12:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-16 17:13 Fix assertion failure on aliases of dynamic weak symbols Richard Sandiford
2007-07-16 21:33 ` H.J. Lu
2007-07-17 1:12 ` PATCH: Remove u.weakdef from elf_link_hash_entry H.J. Lu
2007-07-17 5:39 ` Fix assertion failure on aliases of dynamic weak symbols Ian Lance Taylor
2007-07-17 13:55 ` H.J. Lu
2007-07-17 19:31 ` Ian Lance Taylor
2007-07-18 15:58 ` H.J. Lu
2007-07-18 18:23 ` Richard Sandiford
2007-07-18 21:06 ` H.J. Lu
2007-07-19 19:56 ` PATCH: Check symbol type for symbol alias H.J. Lu
2007-07-20 12:50 ` Richard Sandiford
2007-07-20 13:07 ` H.J. Lu [this message]
2007-07-20 15:03 ` Richard Sandiford
2007-07-20 17:05 ` H.J. Lu
2007-07-21 8:55 ` Richard Sandiford
2007-07-23 5:35 ` H.J. Lu
2007-07-23 10:05 ` Fix assertion failure on aliases of dynamic weak symbols Alan Modra
2007-07-23 11:43 ` Richard Sandiford
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=20070720125052.GA1973@lucon.org \
--to=hjl@lucon.org \
--cc=binutils@sourceware.org \
--cc=iant@google.com \
--cc=richard@codesourcery.com \
/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).