This is the mail archive of the gcc@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: Link-time optimzation


The document is on the web here:

http://gcc.gnu.org/projects/lto/lto.pdf

The LaTeX sources are in htdocs/projects/lto/*.tex.

Thoughts?

It may be worth mentioning that this type of optimization applies mainly to one given type of output: a non-symbolic a.out. When the output it a shared library or an a.out with exposed symbols (-Bexport, -E etc), then the semantics will need to be different.

In the simplest case where you are producing a non-symbolic
a.out, you can detect that global functions or variables
are completely unused, and therefore discard them. However,
if the a.out has some of its symbols exposed by linker options,
then those symbols, and any other symbols or functions which
they reference, must be left intact. Similarly for shared
libraries, although that case is slightly worse as *any* global
symbol must be left intact, unless a specific export list
is being used, in which case only those symbols, and symbols
which they in turn reference, need survive.

At least thats my understanding.

Also, this whole issue of visible symbols and shared libraries
may well be covered by requirement 3, and if so, it may be
worth mentioning since there was no accompanying rationale
for requirement 3.

Kean


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