This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lto][patch] Output references to variables used only in initializers


On Wed, Dec 30, 2009 at 11:30 PM, Rafael Espindola <espindola@google.com> wrote:
> In cases like
>
> extern int c_common_attribute_table[];
> void *foobar = c_common_attribute_table
>
> We are correctly producing references to foobar, but we are not
> producing references to c_common_attribute_table. Tested the patch by
> running
>
> $ GNUTARGET=plugin nm --plugin liblto_plugin.so c-lang.o
>
> And checking that both ?c_common_attribute_table and foobar are in the
> IL symbol table.
>
> This is a reduction of building gcc with lto and the linker plugin.

Please add the testcase as well.  Note that lto_output_tree{_ref}
are weird here in that outputting a reference doesn't guarantee
the object is output.  Please add a comment according to this
at the point of the patch.

Ok with that change.

Thanks,
Richard.

> 2009-12-30 ?Rafael Avila de Espindola ?<espindola@google.com>
>
> ? ? ? ?* lto-streamer-out.c (output_unreferenced_globals): Output the full
> tree of an unreferenced global var.
>
> Cheers,
> --
> Rafael Ávila de Espíndola
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]