This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold link script problem
- From: Ian Lance Taylor <iant at google dot com>
- To: Patrick Oppenlander <pattyo dot lists at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 07 Apr 2011 22:19:50 -0700
- Subject: Re: gold link script problem
- References: <4D9E51BF.6070703@gmail.com>
Patrick Oppenlander <pattyo.lists@gmail.com> writes:
> These scripts start with a MEMORY section:
>
> MEMORY {
> int_flash (rx) : ORIGIN = 0x00000000, LENGTH = 2M
> int_sram (wiax) : ORIGIN = 0x40000000, LENGTH = 32k
> int_srambb (wiax) : ORIGIN = 0x40008000, LENGTH = 32k /* battery
> backed */
> ext_ram (wiax) : ORIGIN = 0x20000000, LENGTH = 512k
> }
>
> When gold encounters this it barfs with:
>
> error: ./ppc/e7/boot.ld:5:5: syntax error, unexpected STRING, expecting ':'
>
> on the int_sram line.
>
> If i simplify the MEMORY section to:
>
> MEMORY {
> int_flash (rx) : ORIGIN = 0x00000000, LENGTH = 2M
> }
>
> I get:
>
> error: ./ppc/e7/boot.ld:5:1: syntax error, unexpected '}', expecting ':'
>
> BFD ld is able to parse these scripts without any issue.
>
> Has anything changed in the syntax for gold link scripts? I have
> searched through the binutils documentation and found nothing
> mentioned.
It's a bug in gold: it doesn't recognize the M and k modifiers that you
are using. It should.
Ian