This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/51859] Linker option effects not reflected in symbol resolution file
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Jan 2012 10:58:24 +0000
- Subject: [Bug lto/51859] Linker option effects not reflected in symbol resolution file
- Auto-submitted: auto-generated
- References: <bug-51859-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51859
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-16
CC| |davek at gcc dot gnu.org
Summary|wrapped symbols (wrap |Linker option effects not
|linker option) do not link |reflected in symbol
| |resolution file
Ever Confirmed|0 |1
Severity|normal |enhancement
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-16 10:58:24 UTC ---
The linker plugin tells us:
1
t.o 3
164 4a7bed50da22d738 PREVAILING_DEF_IRONLY __wrap_malloc
172 4a7bed50da22d738 PREVAILING_DEF main
176 4a7bed50da22d738 RESOLVED_DYN __real_malloc
but it doesn't communicate in any way that malloc should refer to
__wrap_malloc.
That would be a nice enhancement.
For now you need to mark the __wrap_malloc function with __attribute__((used))
because we do not see any reference to it and thus remove it as dead during
optimization.