On Tue, Jun 8, 2010 at 4:15 PM, Bingfeng Mei <b...@broadcom.com> wrote: > Thanks. But why "vvvvv" is linked correctly here? Shouldn't it > be treated as static with -fwhole-program?
Works for me without the linker plugin as well: > gcc-4.5 -O2 -o t t1.o t2.o -flto -fwhole-program -B > /abuild/rguenther/trunk-g/gcc t2.o: In function `foo': t2.c:(.text+0x15): undefined reference to `bar' t2.c:(.text+0x1b): undefined reference to `vvvvvv' collect2: ld returned 1 exit status Richard.