|
From: | hubicka at ucw dot cz |
Subject: | [Bug ld/13244] GNU LD incorrectly complain about undefined hidden symbols with LTO |
Date: | Thu, 06 Oct 2011 18:45:42 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=13244 --- Comment #2 from hubicka at ucw dot cz 2011-10-06 18:45:42 UTC --- address@hidden:/abuild/jh/trunk-3/build-inst7/gcc> cat t.c extern __attribute__ ((visibility("hidden"))) int fooblah; static do_nothing (int param) { if (param) fooblah = 1; } main() { do_nothing (0); } address@hidden:/abuild/jh/trunk-3/build-inst7/gcc> ./xgcc -B ./ -O2 t.c -fno-early-inlining -flto -fuse-linker-plugin address@hidden:/abuild/jh/trunk-3/build-inst7/gcc> ./xgcc -B ./ -O2 t.c -fno-early-inlining -flto -fuse-linker-plugin --shared /abuild/jh/trunk-install/x86_64-unknown-linux-gnu/bin/ld: a.out: hidden symbol `fooblah' isn't defined /abuild/jh/trunk-install/x86_64-unknown-linux-gnu/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status With gold I get: address@hidden:/abuild/jh/trunk-3/build-inst7/gcc> ./xgcc -B ./ -O2 t.c -fno-early-inlining -flto -fuse-linker-plugin --shared address@hidden:/abuild/jh/trunk-3/build-inst7/gcc> because fooblah gets optimized out. Honza -- 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.
[Prev in Thread] | Current Thread | [Next in Thread] |