Mail Archives: djgpp/1997/08/21/20:49:17
Andrew Crabtree wrote:
>
> feeding profile data to the
> linker and asking that it use the profile data to reorder function
> locations to maximize instruction cache hits.
>
> AFAIK the gnu linker doesn't support this, but Robert H would know far
> better than I.
As far as understand the GNU ld it does not optimize or reorder
any function. Probably this is also not possible because
(at least when I remember correct for static functions)
there is no relocation information for these functions. The
calls to these function are coded as relative calls to the
current IP so the linker cannot simply move any of these
functions and also not any global function which might be
located between the static functions.
BTW: I think, when this would be possible, we would have
also a linker which is able to eliminate unused functions
from object files with more than one function :-)
Robert
--
*****************************************************************
* Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau *
* Post: Am Berg 3, D-09573 Dittmannsdorf *
* e-Mail: Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE *
* WWW: http://www.tu-chemnitz.de/~rho *
*****************************************************************
- Raw text -