public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* ARM EABI -specs=nosys crt0.o not being linked in
@ 2017-03-30  6:54 Schwarz, Konrad
  2017-03-30 13:08 ` Hans-Bernhard Bröker
  0 siblings, 1 reply; 2+ messages in thread
From: Schwarz, Konrad @ 2017-03-30  6:54 UTC (permalink / raw)
  To: newlib

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ARM EABI -specs=nosys crt0.o not being linked in
  2017-03-30  6:54 ARM EABI -specs=nosys crt0.o not being linked in Schwarz, Konrad
@ 2017-03-30 13:08 ` Hans-Bernhard Bröker
  0 siblings, 0 replies; 2+ messages in thread
From: Hans-Bernhard Bröker @ 2017-03-30 13:08 UTC (permalink / raw)
  To: newlib

Am 30.03.2017 um 08:54 schrieb Schwarz, Konrad:

> 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?

I'd say no, it's not.  The name "nosys" should be read at face value: it 
says that there is _no_ system assumed.   Which gives you the 
opportunity to specify the details of how the system is get up out of 
reset, by specifying your own choice of start-up file explicitly, on the 
command line. But that also gives you the _obligation_ to actually do it.

Specs files exist to assist you with tailoring the compiler and tools to 
your system --- not to assume 100% of the job for every imaginable use case.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-30 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30  6:54 ARM EABI -specs=nosys crt0.o not being linked in Schwarz, Konrad
2017-03-30 13:08 ` Hans-Bernhard Bröker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).