RE: externally_visible and resoultion file

2010-06-10 Thread Bingfeng Mei
> -Original Message- > From: Cary Coutant [mailto:ccout...@google.com] > Sent: 09 June 2010 18:43 > To: Richard Guenther > Cc: Bingfeng Mei; Jan Hubicka; gcc@gcc.gnu.org > Subject: Re: externally_visible and resoultion file > > >> Yes, this is also wha

Re: externally_visible and resoultion file

2010-06-09 Thread Richard Guenther
On Wed, Jun 9, 2010 at 7:43 PM, Cary Coutant wrote: >>> Yes, this is also what I saw without plugin. I just wonder why "v" >>> is linked with plugin if resolution file is not used to eliminate need >>> of externally_visible attribute here. >> >> Probably because of the same linker-plugin bug t

Re: externally_visible and resoultion file

2010-06-09 Thread Cary Coutant
>> Yes, this is also what I saw without plugin. I just wonder why "v" >> is linked with plugin if resolution file is not used to eliminate need >> of externally_visible attribute here. > > Probably because of the same linker-plugin bug that causes bar > to be resolved. Just to make sure I unde

Re: externally_visible and resoultion file

2010-06-08 Thread Richard Guenther
gin bug that causes bar to be resolved. Richard. > Thanks, > Bingfeng > >> -Original Message- >> From: Richard Guenther [mailto:richard.guent...@gmail.com] >> Sent: 08 June 2010 15:18 >> To: Bingfeng Mei >> Cc: Jan Hubicka; gcc@gcc.gnu.org; Cary Cout

RE: externally_visible and resoultion file

2010-06-08 Thread Bingfeng Mei
mail.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 wrote: > > Thanks. But why "v" is linked correctl

Re: externally_visible and resoultion file

2010-06-08 Thread Richard Guenther
On Tue, Jun 8, 2010 at 4:15 PM, Bingfeng Mei wrote: > Thanks. But why "v" 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

RE: externally_visible and resoultion file

2010-06-08 Thread Bingfeng Mei
Hubicka; gcc@gcc.gnu.org; Cary Coutant > Subject: Re: externally_visible and resoultion file > > On Tue, Jun 8, 2010 at 3:01 PM, Bingfeng Mei wrote: > > Hi, > > Sorry for coming back to this issue after a while. I am still puzzled > > by this. The following are t

Re: externally_visible and resoultion file

2010-06-08 Thread Richard Guenther
On Tue, Jun 8, 2010 at 3:01 PM, Bingfeng Mei wrote: > Hi, > Sorry for coming back to this issue after a while. I am still puzzled > by this. The following are two test files: > > a.c > > #include > #include > extern int foo(int); > void bar() > { >  printf("bar\n"); > } > extern int src[], dst[]

RE: externally_visible and resoultion file

2010-06-08 Thread Bingfeng Mei
way. Thanks, Bingfeng > -Original Message- > From: Jan Hubicka [mailto:hubi...@ucw.cz] > Sent: 27 May 2010 09:04 > To: Richard Guenther > Cc: Bingfeng Mei; gcc@gcc.gnu.org > Subject: Re: externally_visible and resoultion file > > > On Wed, May 26, 2010 at 5:53 P

Re: externally_visible and resoultion file

2010-05-27 Thread Jan Hubicka
> On Wed, May 26, 2010 at 5:53 PM, Bingfeng Mei wrote: > > Hi, Richard, > > With resolution file generated by GOLD (or I am going to hack gnu LD),  is > > externally_visible attribute still needed to annotate those symbols accessed > > from non-LTO objects when compiling with -fwhole-program. > >

Re: externally_visible and resoultion file

2010-05-26 Thread Richard Guenther
On Wed, May 26, 2010 at 5:53 PM, Bingfeng Mei wrote: > Hi, Richard, > With resolution file generated by GOLD (or I am going to hack gnu LD),  is > externally_visible attribute still needed to annotate those symbols accessed > from non-LTO objects when compiling with -fwhole-program. Yes it is. W

externally_visible and resoultion file

2010-05-26 Thread Bingfeng Mei
Hi, Richard, With resolution file generated by GOLD (or I am going to hack gnu LD), is externally_visible attribute still needed to annotate those symbols accessed from non-LTO objects when compiling with -fwhole-program. In theory, it shouldn't be needed since LTO has all information. But what