This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gold link script problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]