[Bug lto/51859] Linker option effects not reflected in symbol resolution file

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 16 11:17:00 GMT 2012


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.



More information about the Gcc-bugs mailing list