http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47287
--- Comment #4 from dave at hiauly1 dot hia.nrc.ca 2011-01-17 15:12:38 UTC --- > I suppose you are using GNU ld, right? Yes (gold has not been ported). > On trunk x86_64 with stock binutils 2.21 I get > > > cat 20010124-1.res > 3 > 20010124-1.o 3 > 79 2651d4ed PREVAILING_DEF_IRONLY main_test > 85 2651d4ed RESOLVED_IR g > 110 2651d4ed RESOLVED_IR f > 20010124-1-lib.o 3 > 113 f6a75653 PREVAILING_DEF_IRONLY f > 127 f6a75653 PREVAILING_DEF_IRONLY g > 153 f6a75653 RESOLVED_IR inside_main > main.o 3 > 79 2cccb08f PREVAILING_DEF main > 85 2cccb08f RESOLVED_IR main_test > 88 2cccb08f PREVAILING_DEF_IRONLY inside_main > > thus, memcpy is also missing but at least main_test is correctly > used from 20010124-1.o. > > Thus - can you tell us your exact GNU ld version and maybe debug > what is the lto_symtab contents we generate (there is a > lto-plugin/lto-symtab.c > program, not sure if it still works ...) It has been rebuilt a number of times recently. Last night's test run still shows the bug and it used: dave@gsyprf11:~/gcc-4.6/objdir$ ld --version GNU ld (GNU Binutils) 2.21.51.20110116 I tried to do a build without plugin support, but it seems there is a ld configure bug and plugin support can't be disabled. With older versions, I think plugin support had to be explicitly enabled (default was no). I'll try to debug the lto_symtab contents tonight. Dave