summaryrefslogtreecommitdiffstats
path: root/lib/csu/powerpc
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-07-16 12:28:50 +0000
committermarkm <markm@FreeBSD.org>2002-07-16 12:28:50 +0000
commitbedd05ccecbd002c4865f3dff35af258f0e5dd94 (patch)
tree4dcd84e724c9495af7116ae6dbbcee1b0420fb84 /lib/csu/powerpc
parent4de6bef14519eb23505d35e15226e5711028252c (diff)
downloadFreeBSD-src-bedd05ccecbd002c4865f3dff35af258f0e5dd94.zip
FreeBSD-src-bedd05ccecbd002c4865f3dff35af258f0e5dd94.tar.gz
The main reason for this is to reduce diffs between all the crt1.c's.
Assembler macros are tidied up and made as similar as sanely possible. The macros are translated into C (__inline static) functions for lint. Declaration orders are made the same. Declarations are all ISOfied and tidied up. Comment contents have gratuitous diffs removed. The net result is a bunch of crt1.c's that are 90% the same. It may be possible to now encapsulate the differences in one MD header, and have only one MI crt1.c file (although the macros to do this may be ugly). Helpful comments by: obrien, bde Alpha tested by: des i386-elf tested by: markm
Diffstat (limited to 'lib/csu/powerpc')
-rw-r--r--lib/csu/powerpc/crt1.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/lib/csu/powerpc/crt1.c b/lib/csu/powerpc/crt1.c
index 46156eb..4206754 100644
--- a/lib/csu/powerpc/crt1.c
+++ b/lib/csu/powerpc/crt1.c
@@ -38,23 +38,28 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef lint
#ifndef __GNUC__
#error "GCC is needed to compile this file"
#endif
+#endif /* lint */
#include <stdlib.h>
+
#include "libc_private.h"
#include "crtbrand.c"
struct Struct_Obj_Entry;
struct ps_strings;
-#pragma weak _DYNAMIC
extern int _DYNAMIC;
+#pragma weak _DYNAMIC
-extern void _init(void);
extern void _fini(void);
+extern void _init(void);
extern int main(int, char **, char **);
+extern void _start(int, char **, char **, const struct Struct_Obj_Entry *,
+ void (*)(void), struct ps_strings *);
#ifdef GCRT
extern void _mcleanup(void);
@@ -67,23 +72,20 @@ char **environ;
const char *__progname = "";
struct ps_strings *__ps_strings;
-/* The entry function.
- *
+/* The entry function. */
+/*
* First 5 arguments are specified by the PowerPC SVR4 ABI.
* The last argument, ps_strings, is a BSD extension.
*/
+/* ARGSUSED */
void
-_start(argc, argv, envp, obj, cleanup, ps_strings)
- int argc;
- char **argv, **envp;
- const struct Struct_Obj_Entry *obj; /* from shared loader */
- void (*cleanup)(void); /* from shared loader */
- struct ps_strings *ps_strings; /* BSD extension */
+_start(int argc, char **argv, char **env,
+ const struct Struct_Obj_Entry *obj __unused, void (*cleanup)(void),
+ struct ps_strings *ps_strings)
{
- char *namep;
const char *s;
- environ = envp;
+ environ = env;
if (argc > 0 && argv[0] != NULL) {
__progname = argv[0];
@@ -106,7 +108,7 @@ _start(argc, argv, envp, obj, cleanup, ps_strings)
monstartup(&eprol, &etext);
#endif
_init();
- exit( main(argc, argv, envp) );
+ exit( main(argc, argv, env) );
}
#ifdef GCRT
OpenPOWER on IntegriCloud