This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: output section placement at end of memory
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Josef Angermeier <sijoange at cip dot informatik dot uni-erlangen dot de>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 27 Jul 2005 18:18:11 +0930
- Subject: Re: output section placement at end of memory
- References: <20050727062042.GK6254@faui00i.informatik.uni-erlangen.de>
On Wed, Jul 27, 2005 at 08:20:42AM +0200, Josef Angermeier wrote:
> Can this be done with an ld linker script ? - i've read the manual and
> think it can't be done, because the size of "*.special" isn't known
> until it's corresponding output section is created, so you can't
> calculate the number of padding bytes.
Correct.
> Im probably not the only one facing this problem, so how did others
> solve that ?
Link first without any padding, extract the section sizes, relink with
calculated padding. You should be able to automate this.
--
Alan Modra
IBM OzLabs - Linux Technology Centre