On Tue, Aug 05, 2014 at 08:18:06PM -0400, Ulrich Drepper wrote: > On Tue, Aug 5, 2014 at 12:57 AM, Alan Modra <amo...@gmail.com> wrote: > > What version linker? In particular, do you have the fix for PR12975? > > The Fedora 19 version. I think it hasn't changed since then which > means it is 2.23.88.0.1-13 (from the RPM version number). No idea > whether that fix is included and unfortunately won't have time to try > before the weekend.
Both Fedora 19 and 20 have the patch needed for this to work. Hmm, I suppose the other thing necessary is a gcc that implements LDPT_GET_SYMBOLS_V2. You may be lacking that. Here's what I see with mainline gcc and ld. cat > ltoshare.c <<\EOF int cond (void) { return 0; } extern void something (void); int main (void) { if (cond ()) something (); return 0; } EOF cat > ltoshare.ver <<\EOF { global: main; local: *; }; EOF ~/build/gcc-current/gcc/xgcc -B ~/build/gcc-current/gcc/ -B ld/tmpdir/ld -O2 -fPIC -flto -c ltoshare.c ~/build/gcc-current/gcc/xgcc -B ~/build/gcc-current/gcc/ -B ld/tmpdir/ld -shared -flto -o ltoshare.so ltoshare.o nm -D ltoshare.so | grep something U something ~/build/gcc-current/gcc/xgcc -B ~/build/gcc-current/gcc/ -B ld/tmpdir/ld -shared -flto -o ltoshare.so ltoshare.o -Wl,--version-script=ltoshare.ver nm -D ltoshare.so | grep something -- Alan Modra Australia Development Lab, IBM