Cross gcc Mailing List Archive
[Prev][Next][Index][Thread]
RE: Newlib's crt0.S
I'm not sure if this will cause trouble, but is suspect its fine.
The ANSII spec says that uninitialised variables will be zero at startup. The
assumption for initialised variables is that the compiler will generate code
that will initialise them before the main body of code is entered. In the case
of C++, there will be a list of constructors to call. I have not looked closely
at what gcc does to do this but compilers usually produce a block to copy before
main or they produce a section of data that the linker places, in which case you
certainly do not want crt0.s to initialise it.
----------
From: Ng BengKiat[SMTP:nbk@np.ac.sg]
Sent: 22 January 1997 09:40
To: 'crossgcc@cygnus.com'
Subject: Newlib's crt0.S
<<File: crt0.S>>Attached is the newlib-1.7.0's crt0.S for m68332.
I noticed that the initialised global variables are not initialised
in the startup, only the unitialised variables are. Is this a problem?
If it is, does anybody has a complete solution?
Follow-Ups:
Home |
Subject Index |
Thread Index