I have two linker scripts: common.ld which defines some symbols, and app.ld which positions the sections, using these defines.
If I just cat the two files together, and feed that to ld (via gcc), it works.
If I use the INCLUDE command:
INCLUDE common.ld
I get the error:
ld.exe: invalid syntax in flags
collect2: ld returned 1 exit status
What do I do wrong? What is a correct statement to include another load script?
From http://www.scoberlin.de/content/media/http/informatik/gcc_docs/ld_3.html#IDX204 :
INCLUDE filename
Include the linker script filename at this point. The file will be searched for in the current directory, and in any directory specified with the -L option. You can nest calls to INCLUDE up to 10 levels deep.
Note: I'm running this on a Windows 7 PC, using arm gcc tools from Code Red, full version:
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.6.2 20121016 (release) [ARM/embedded-4_6-branch revision 192487