This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
ARM EABI -specs=nosys crt0.o not being linked in
- From: "Schwarz, Konrad" <konrad dot schwarz at siemens dot com>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Thu, 30 Mar 2017 06:54:11 +0000
- Subject: ARM EABI -specs=nosys crt0.o not being linked in
- Authentication-results: sourceware.org; auth=none
Hi,
In my project, the linker reports the error
[...]/../../../../arm-atollic-eabi/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to 08000800
This means that crt0.o is not being linked in.
GCC -dumpspecs defines startfile as
*startfile:
crti%O%s crtbegin%O%s
I am runnig gcc with -specs=nosys; nosys.specs does not mention crt0.o. However, several of the other newlib-supplied spec files do override startfile; e.g. rdimon.specs:
*startfile:
crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s}
To my thinking, nosys.specs, rdimon.specs, rdpmon.specs, linux.specs, pid.specs, ... are mutually exclusive, since each defines an interface to a "BIOS". It follows that nosys.specs should be properly defining startfile. Is that correct? Or is nosys.specs orthogonal to the other spec files, and a new spec file "baremetal.specs" that basically overrides startfile is needed? Or is the breakage somewhere else?
Gcc I am using: arm-atollic-eabi-gcc.exe (GNU Tools for ARM Embedded Processors (Build 16.04-3)) 5.3.1 20160307 (release) [ARM/embedded-5-branch revision 234589]
_NEWLIB_VERSION is "2.4.0" according to include/_newlib_version.h
Thanks
Konrad