http://sourceware.org/bugzilla/show_bug.cgi?id=13230

             Bug #: 13230
           Summary: IRONLY_EXP incorrectly reported as IRONLY by gold when
                    fat LTO files are used
           Product: binutils
           Version: 2.23 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassig...@sources.redhat.com
        ReportedBy: hubi...@gcc.gnu.org
    Classification: Unclassified


This requires GCC patch to use new plugin interface. But the problem seems
quite clear. Gold is confusing reference from discarded section of fat LTO
object with real reference to the comdat symbol.

jh@evans:/abuild/jh/trunk-3/build-inst7/gcc> ./xgcc -B ./ -O2 t.o -flto
--save-temps
[Leaving LTRANS /tmp/cczdYmCj.args]
[Leaving LTRANS /tmp/ccCqokiD.ltrans.out]
[Leaving LTRANS /tmp/ccLoaOjG.args]
[Leaving LTRANS /tmp/ccCqokiD.ltrans0.o]
jh@evans:/abuild/jh/trunk-3/build-inst7/gcc> cat t.C
#include <stdio.h>
inline void test (void)
{
  printf("Do something\n");
}
void *optimize_me_away_at_lto = (void *)&test;
main ()
{
  test();
}
jh@evans:/abuild/jh/trunk-3/build-inst7/gcc> ./xgcc -B ./ -O2 t.C -flto
jh@evans:/abuild/jh/trunk-3/build-inst7/gcc> ./xgcc -B ./ -O2 t.o -flto
--save-temps
[Leaving LTRANS /tmp/ccURJfxM.args]
[Leaving LTRANS /tmp/ccJTd7um.ltrans.out]
[Leaving LTRANS /tmp/ccvoyXEC.args]
[Leaving LTRANS /tmp/ccJTd7um.ltrans0.o]
jh@evans:/abuild/jh/trunk-3/build-inst7/gcc> more t.res
1
t.o 2
171 4348d11c PREVAILING_DEF_IRONLY _Z4testv
177 4348d11c PREVAILING_DEF main
jh@evans:/abuild/jh/trunk-3/build-inst7/gcc>

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to