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

             Bug #: 14747
           Summary: undefined reference to `_GLOBAL_OFFSET_TABLE_' with
                    -flto
           Product: binutils
           Version: 2.24 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassig...@sourceware.org
        ReportedBy: pola...@redhat.com
    Classification: Unclassified


When I apply the patches/binutils-lto-mixed-18.patch to trunk, then on i?86:

# cat pr13229.cc 
int call_something (int);
inline void optimize_me_out (void)                                              
{ 
  call_something(0);
}
__attribute__ ((visibility("hidden")))
int optimize_me_out2 (int param)                                                
{ 
  if ((void *)optimize_me_out != (void *)call_something)
    return call_something(0);                                                   
}
void test2 (void)
{ 
  optimize_me_out();
}
# g++ -c -O2 -fno-early-inlining -flto pr13229.cc
# g++ -shared -O2 -fPIC -flto -fuse-linker-plugin -nostdlib pr13229.o
/tmp/ccCXA40F.ltrans0.ltrans.o: In function `test2()':
ccCXA40F.ltrans0.o:(.text+0x8): undefined reference to `_GLOBAL_OFFSET_TABLE_'
collect2: error: ld returned 1 exit status

(The testcase is ld/13229.)

-- 
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