This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Symbol re-ordering in ld?


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
loading binaries.

Additionally, wouldn't it be a generally useful optimization to have
the linker always group global constructors together in an output
file?

regards

  [ bryce ]



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