This one is interesting. Apparently there is a bug in the ld command file lexer. I'm using binutils version 2.24 and had the same problem. One of your included files has a MEMORY command something like
MEMORY
{
rom (rx) : ORIGIN = 0x00000000, LENGTH = 64M
ram (!rx) : ORIGIN = 0x48000000, LENGTH = 32M
}
I think (but haven't proven) that the lexer is returning "!rx" instead of "rx" for the second attribute in an included file. Changing the MEMORY command to
MEMORY
{
rom (rx) : ORIGIN = 0x00000000, LENGTH = 64M
ram (! rx) : ORIGIN = 0x48000000, LENGTH = 32M
}
fixes the problem. I looked at ldlex.l and ldgram.y in the ld sources but couldn't find an obvious error before my eyes started to hurt.
Bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=17900