> -----Original Message-----
> From: Manuel López-Ibáñez [mailto:lopeziba...@gmail.com]
> Sent: 11 June 2010 14:14
> To: Bingfeng Mei
> Cc: Dave Korn; Richard Guenther; gcc@gcc.gnu.org; Jan Hubicka
> Subject: Re: Issue with LTO/-fwhole-program
> 
> On 11 June 2010 15:04, Bingfeng Mei <b...@broadcom.com> wrote:
> > Well, mixed LTO/non-LTO is quite useful. For example, we have mixed
> C/assembly
> > Application. Gold support for our target is still far away. I found -
> fwhole-program
> > is very important for our size optimization.
> 
> But if I understand correctly, mixed LTO/non-LTO + whole-program is
> almost never correct. So we should really emit a warning for this
> specific combination. I think making this mistake would be quite easy
> but hard to debug.
> 
Yes, very trick indeed. When I annotate externally_visible attribute 
to our application, I iteratively check linker map to find which symbols
are accessed by non-LTO objects.  Sometimes, I end up with one inlined copy
and one original copy and compiler doesn't complain. That's why I am 
working to make the process automated assuming we have full resolution file. 

Bingfeng


Reply via email to