This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Re: Objcopy problem
On Tue, Oct 30, 2007 at 07:35:10PM +0000, David COOK wrote:
> We don't know the size required for the reserve section at compile
> time. In addition we do not know the number of reserve sections
> required - the test case provided only had one for the .text section,
> but our default linker script supports two, and our users may decide to
> create more using an additional linker script.
I see. I actually know how to do this:
SECTIONS
{
.text : { *(.text) }
foo : { KEEP(*(foo)); . = . + 0x20; }
}
Put a zero-byte but allocated section foo into your input files somewhere.
You'll get a zero byte output section if you remove the assignment to
dot and a bigger one otherwise.
However, you appear to be correct that this ought to still work.
--
Daniel Jacobowitz
CodeSourcery