http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274
--- Comment #23 from Dave Korn <davek at gcc dot gnu.org> 2011-01-31 18:53:30 UTC --- (In reply to comment #21) > The problem is that first one is defined as prevailing_def_ironly while it is > not an definition, just use of the symbol. Correct would be to have > PREVAILING_DEF_IRONLY on the second and PREEMTED_IR on the first. > We probably should add sanity check that functions with PREVAILING_DEFs are > always analyzed and vars finalized. > > As observer by Richard, it comes from resolution file already: > abs-1.o 3 > 70 262910e5 PREEMPTED_IR main_test > main.o 3 > 76 e5772d37 PREVAILING_DEF_IRONLY main_test > should be the other way around Why would you expect to see PREEMPTED_IR? There is only one definition of main_test; I would expect RESOLVED_IR. Rather than swapped, aren't they just plain wrong? > I am quite convinced that we are seeing GNU LD bug and adding Dave Korn to CC > thus. I also think you must be seeing a bug in LD, but haven't reproduced it yet; on both x86_64-linux and i686-cygwin I get the same correct resolution file: davek@gcc10:~/binutils/obj-gcc/gcc/pr47274$ cat *.res 3 abs-1.o 2 79 7d1d28a3 PREVAILING_DEF_IRONLY main_test 93 7d1d28a3 PREVAILING_DEF_IRONLY abs_called abs-1-lib.o 2 110 4db0e4c5 RESOLVED_IR inside_main 112 4db0e4c5 RESOLVED_IR abs_called main.o 4 79 8cf841f3 PREVAILING_DEF main 85 8cf841f3 PREVAILING_DEF_IRONLY link_error 89 8cf841f3 RESOLVED_IR main_test 99 8cf841f3 PREVAILING_DEF_IRONLY inside_main What endian-ness are the ppc and hppa targets?