Ok, that makes sense. Thanks again:)

> -----Original Message-----
> From: Richard Biener [mailto:richard.guent...@gmail.com]
> Sent: 2020年3月26日 21:19
> To: lizekun (A) <lizek...@huawei.com>
> Cc: gcc@gcc.gnu.org
> Subject: Re: Question on lto-stream-out
> 
> On Thu, Mar 26, 2020 at 2:00 PM lizekun (A) <lizek...@huawei.com> wrote:
> >
> > Thanks for replying!
> >
> > I've dumped the lto stream-out file and noticed that constructors are
> > streamed to  function_body.
> > Also, I noticed that, the binany which is generated when streaming
> > constructors to function_body has bigger size than the one's streaming to
> decls.
> >
> > So, I wonder why we need to stream constructors to other section.
> 
> Because we then can ship them selectively to only the LTRANS units that can
> make use of them saving in streaming for other LTRANS units.
> 
> Richard.
> 
> > Best regards!
> >
> > > -----Original Message-----
> > > From: Richard Biener [mailto:richard.guent...@gmail.com]
> > > Sent: 2020年3月26日 20:27
> > > To: lizekun (A) <lizek...@huawei.com>
> > > Cc: gcc@gcc.gnu.org
> > > Subject: Re: Question on lto-stream-out
> > >
> > > On Thu, Mar 26, 2020 at 12:01 PM lizekun (A) <lizek...@huawei.com>
> wrote:
> > > >
> > > > Hi,
> > > > I have a question on function "get_symbol_initial_value" in
> > > > lto-stream-
> > > out.c.
> > > >
> > > > When the initial value of symbol is constructor, it will be
> > > > replaced by an
> > > error_mark.
> > > > What's the benefit of donging this? In some cases, it increases
> > > > the size of
> > > binary.
> > >
> > > constructors are streamed into a separate section, the above just
> "marks"
> > > the variable that there is one available.
> > >
> > > > I would be grateful if anyone could help.
> > > >
> > > > Best regulars

Reply via email to