http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46055

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-18 12:23:36 
UTC ---
(In reply to comment #8)
> Hmm, does -fuse-linker-plugin have the same side-effects as -fwhole-program?
> That will break symbol use by dlopened objects and we have to avoid that.
> 

[...@gnu-6 pr46055]$ make
/export/build/gnu/gcc/build-x86_64-linux/prev-gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/prev-gcc/ -O2 -fuse-linker-plugin
-fwhopr -o foo foo.i
ld.gold: /tmp/ccIRVeGM.ltrans0.ltrans.o: in function
main:ccIRVeGM.ltrans0.o(.text+0x3): error: undefined reference to
'pstat_getstatic'
collect2: ld returned 1 exit status
make: *** [foo] Error 1
[...@gnu-6 pr46055]$ /export/build/gnu/gcc/build-x86_64-linux/prev-gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/prev-gcc/ -O2 -fwhopr -o foo foo.i
/tmp/cczPtxXa.o: In function `main':
foo.i:(.text+0x3): undefined reference to `pstat_getstatic'
collect2: ld returned 1 exit status
[...@gnu-6 pr46055]$ /export/build/gnu/gcc/build-x86_64-linux/prev-gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/prev-gcc/ -O2 -fwhole-program -o foo
foo.i
/tmp/ccB81NJo.o: In function `main':
foo.i:(.text+0x3): undefined reference to `pstat_getstatic'
collect2: ld returned 1 exit status
[...@gnu-6 pr46055]$ /export/build/gnu/gcc/build-x86_64-linux/prev-gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/prev-gcc/ -O2 -fwhole-program -o foo
foo.i -fuse-linker-plugin
ld.gold: /tmp/cc4NeRs5.o: in function main:foo.i(.text+0x3): error: undefined
reference to 'pstat_getstatic'
collect2: ld returned 1 exit status
[...@gnu-6 pr46055]$ 

It only happens with "-fuse-linker-plugin -fwhopr".

Reply via email to