delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/21/20:49:17

From: Robert Hoehne <Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Function Sizes
Date: Wed, 20 Aug 1997 12:26:58 +0200
Organization: TU Chemnitz-Zwickau
Lines: 30
Message-ID: <33FAC672.2F70985E@Mathematik.TU-Chemnitz.DE>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 970819161648 DOT 21250R-100000 AT is> <33f9d88f DOT 336368 AT news DOT eclipse DOT co DOT uk> <01bcace2$00dea970$45111d0f AT ros51675cra>
NNTP-Posting-Host: pandora.hrz.tu-chemnitz.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019