gold link script problem

Patrick Oppenlander pattyo.lists@gmail.com
Fri Apr 8 00:05:00 GMT 2011


Hi all,

I'm currently in the process of converting an embedded project to using 
GCC4.6 with lto and gold and I'm running into a problem with some of my 
link scripts.

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.

Thanks,

         Patrick









More information about the Binutils mailing list