bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/14747] New: undefined reference to `_GLOBAL_OFFSET_TABLE_' with


From: polacek at redhat dot com
Subject: [Bug ld/14747] New: undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto
Date: Sat, 20 Oct 2012 20:20:49 +0000

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: address@hidden
        ReportedBy: address@hidden
    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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]