[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto
From: |
polacek at redhat dot com |
Subject: |
[Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto |
Date: |
Thu, 25 Oct 2012 11:59:16 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=14747
--- Comment #8 from Marek Polacek <polacek at redhat dot com> 2012-10-25
11:59:16 UTC ---
Ok, reproducible even on x86_64 Fedora 16 with trunk GCC. I have built current
GCC trunk (just ../configure --prefix=`pwd` --enable-languages=c,c++
--disable-bootstrap) and current hjl/lto/master branch (just ../configure &&
make). Then in ~/hbin2 I have newly built ld-new and a 'ld' script:
$ cat ~/hbin2/ld
#!/bin/sh
/home/marek/hbin2/ld-new --version
exec /home/marek/hbin2/ld-new "$@"
Now, it is needed to adjust ORIGINAL_LD_FOR_TARGET and
ORIGINAL_PLUGIN_LD_FOR_TARGET in ./gcc/collect-ld to point to newly built
ld-new, so e.g. "/home/marek/hbin2/ld". Then just:
$ PATH=~/hbin2:$PATH ~/rh/x/trunk/gcc/g++ -B ~/rh/x/trunk/gcc -c -O2
-fno-early-inlining -flto pr13229.cc -m32
$ PATH=~/hbin2:$PATH ~/rh/x/trunk/gcc/g++ -B ~/rh/x/trunk/gcc -shared -O2 -fPIC
-flto -fuse-linker-plugin -nostdlib pr13229.o -m32
GNU ld (GNU Binutils) 2.23.51.20121025
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
/tmp/cck1nj8q.ltrans0.ltrans.o: In function `test2()':
cck1nj8q.ltrans0.o:(.text+0x8): undefined reference to `_GLOBAL_OFFSET_TABLE_'
collect2: error: ld returned 1 exit status
Tried also gcc-4_7 branch and the result is the same like above.
--
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 ld/14747] New: undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, polacek at redhat dot com, 2012/10/20
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, hjl.tools at gmail dot com, 2012/10/20
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, polacek at redhat dot com, 2012/10/22
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, hjl.tools at gmail dot com, 2012/10/24
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, polacek at redhat dot com, 2012/10/24
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, polacek at redhat dot com, 2012/10/24
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, polacek at redhat dot com, 2012/10/24
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, hjl.tools at gmail dot com, 2012/10/24
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto,
polacek at redhat dot com <=
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, hjl.tools at gmail dot com, 2012/10/25
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, polacek at redhat dot com, 2012/10/25
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, hjl.tools at gmail dot com, 2012/10/25
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, hjl.tools at gmail dot com, 2012/10/25
- [Bug ld/14747] undefined reference to `_GLOBAL_OFFSET_TABLE_' with -flto, hjl.tools at gmail dot com, 2012/10/26