We have to use ENDFILE_SPEC for the default linker script and not
STARTFILE_SPEC, since STARTFILE_SPEC is place before the user provided
library search paths.
gcc/
* config/rtems.h (STARTFILE_SPEC): Remove qnolinkcmds.
(ENDFILE_SPEC): Evaluate qnolinkcmds.
*/
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!qrtems:crt0%O%s} " \
-"%{qrtems:" RTEMS_STARTFILE_SPEC " %{!qnolinkcmds:-T linkcmds%s}}"
+"%{qrtems:" RTEMS_STARTFILE_SPEC "}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
-"%{qrtems:" RTEMS_ENDFILE_SPEC "}"
+"%{qrtems:" RTEMS_ENDFILE_SPEC " %{!qnolinkcmds:-T linkcmds%s}}"
/*
* Some targets do not set up LIB_SPECS, override it, here.