From: Robert Hoehne 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: <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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 * *****************************************************************