This is the mail archive of the
mailing list for the binutils project.
Symbol re-ordering in ld?
- To: binutils at sources dot redhat dot com
- Subject: Symbol re-ordering in ld?
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Tue, 27 Mar 2001 17:33:37 +1200
Is it possible to have the linker emit symbols in some explicit order,
rather than just whatever order is encountered in the input files?
Specifically, GCJ emits a "class registration" global constructor for
every class it compiles. These end up being dispersed throughout
generated archives (such as libgcj.so), resulting in added startup
overhead as the kernel has to bring in many dispersed pages. If we
could group those global constructor functions together, the number of
page faults at startup would presumably be reduced resulting in faster
Additionally, wouldn't it be a generally useful optimization to have
the linker always group global constructors together in an output
[ bryce ]