This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2251] Weak undefined symbol doesn't work properly with PIE
- From: "drepper at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 9 Aug 2006 06:07:24 -0000
- Subject: [Bug libc/2251] Weak undefined symbol doesn't work properly with PIE
- References: <20060131191328.2251.hjl@lucon.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From drepper at redhat dot com 2006-08-09 06:07 -------
I completely disagree.
The main executable references undef_func. It's not available at link time.
That's fine, it's a weak reference. Like every other weak reference every user
has to check whether the pointer is NULL or not.
But the fact that the symbol is not defined doesn't mean it should not be found
at runtime. It should be treated like every other symbol not found in the
executable itself (sans the error message from the linker).
This means, the correct behavior is for the linker to emit a relocation for the
symbol in which case the exec test case would also print FAILED. This is a bug
in binutils.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://sourceware.org/bugzilla/show_bug.cgi?id=2251
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.