This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: How to limit both the size and the address range of sections in ld script?
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Pan ruochen <panruochen at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 20 Mar 2009 18:30:34 +1030
- Subject: Re: How to limit both the size and the address range of sections in ld script?
- References: <af0faace0903200049m6e1d9ff4k8564f14d26f19406@mail.gmail.com>
On Fri, Mar 20, 2009 at 03:49:54PM +0800, Pan ruochen wrote:
> Dear All,
>
> How can I implement such a ld script:
> 1. The size of sections .text .data and .bss is not beyond 128K
> 2. The sections .text .data and .bss are located within the address
> range 0x80040000~0x80080000
Start off SECTIONS with
. = 0x80040000
> If one of the conditions is false, I wish LD report an error.
After output sections,
ASSERT (. < 0x20000, "too big")
--
Alan Modra
Australia Development Lab, IBM