This is the mail archive of the gcc-help@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]

Linker question about global vs. local symbols


I have a C++ embedded application which has a TON of symbols.  Because
of the way the target must be built, our link phase takes about 20
minutes on a Sun.  Several thousand of the symbols are currently global
but can be made local, because they are only used from the one source
file that contains them.  When developing and fixing bugs, we may do
compile / link cycles many times in a day. 

>From what I understand, all symbols (both local and global) always
appear in the symbol table for the GNU tool chain.  (Older compilers I
worked with didn't expose any local symbols outside of the .o). 

Would link times get reduced by making a large % of the symbols that are
currently global into local (ie, static) symbols?  Does the linker do a
filtering pass that walks all the objects and libraries in question to
build a list of global symbols that it later works on rather than always
trying to resolve each symbol off the full list? 

Splitting the app into smaller executables isn't possible because of the
architecture and cross dependencies. 

Any info anyone can give would be appreciated. 

Thanks,
	Dave


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