Incremental linking, ELF, & templates => REDUNDANT CODE
Ian Lance Taylor
ian@cygnus.com
Fri Apr 10 12:23:00 GMT 1998
Date: Fri, 10 Apr 1998 06:56:17 -0400 (EDT)
From: "Brad M. Garcia" <bgarcia@fore.com>
It appears that when you do an incremental link (ld -r), this
cancellation will occur during that link, but subsequent links will
fail to cancel redundant code.
When a *.o file is created from a C++ source file, it has a number of
sections called .gnu.linkonce.*. When the incremental link is attempted,
it appears that redundant copies of these sections are removed, but then
these sections are simply rolled into the .text section of the resulting
*.o file. Once in the .text section, weak symbols cannot be removed.
This seems like a bug in the linker. Has anyone heard of a fix?
Am I wrong in my analysis? I'm using binutils 2.8.1.
This is a bug in the binutils 2.8.1 release. I believe that it will
be fixed in the upcoming binutils 2.9 release.
Linker bug reports should really go to bug-gnu-utils@gnu.org rather
than egcs@cygnus.com.
Ian
More information about the Gcc
mailing list