This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: externally_visible and resoultion file
Yes, this is also what I saw without plugin. I just wonder why "vvvvv"
is linked with plugin if resolution file is not used to eliminate need
of externally_visible attribute here.
Thanks,
Bingfeng
> -----Original Message-----
> From: Richard Guenther [mailto:richard.guenther@gmail.com]
> Sent: 08 June 2010 15:18
> To: Bingfeng Mei
> Cc: Jan Hubicka; gcc@gcc.gnu.org; Cary Coutant
> Subject: Re: externally_visible and resoultion file
>
> On Tue, Jun 8, 2010 at 4:15 PM, Bingfeng Mei <bmei@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.