Add "-v" to LD= to find out exactly what command line gcc is using to invoke the linker; you might find that it's including the *.ld file twice (possibly due to nosys.specs?).