About LTO merging symbol tables

Diego Novillo dnovillo@google.com
Sat Sep 18 22:56:00 GMT 2010


On Thu, Sep 16, 2010 at 18:06, Hongtao <yu171@purdue.edu> wrote:
>  Hi All,
>
> Does the lto module merge all the global symbol tables maintained by
> each function together? I mean, for example, if in two function bodies
> there are two global variable (suppose its name is aaa) references . Are
> the VAR_DECL nodes of variable aaa in the two function bodies is the
> same node?

If they can be merged under the One Definition Rule, then yes.
Otherwise, an error is emitted.  It uses the same rules used by the
linker.


Diego.



More information about the Gcc mailing list