This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: allow INCLUDE in more places
- From: "Robert Norton" <rnorton at broadcom dot com>
- To: "Nathan Sidwell" <nathan at codesourcery dot com>, binutils <binutils at sources dot redhat dot com>
- Date: Thu, 3 Jul 2008 05:13:53 -0700
- Subject: RE: allow INCLUDE in more places
- References: <486CC18F.5060906@codesourcery.com>
> -----Original Message-----
> From: binutils-owner@sourceware.org
> [mailto:binutils-owner@sourceware.org] On Behalf Of Nathan Sidwell
> Sent: 03 July 2008 13:10
> To: binutils
> Subject: allow INCLUDE in more places
>
> I got stuck trying to INCLUDE linker fragments because
> INCLUDE is currently only
> allowed at the top level. This patch adds grammar fragments
> to allow INCLUDE
> inside MEMORY and SECTIONS elements, and also inside output
> section directives.
>
> The change to the lexer to recognize INCLUDE inside
> expressions is necessary
> because the MEMORY elements are all parsed as EXPRESSIONS and
> we never return to
> SCRIPT lexing (note the lack of element terminators).
>
> With this patch I'm able to create somewhat more flexible
> linker scripts.
>
> ok?
>
> nathan
> --
> Nathan Sidwell :: http://www.codesourcery.com ::
> CodeSourcery
I certainly support the intent of this patch. We currently use CPP to
pre-processes linker scripts before using them and this could save us
the hassle.
Robert