Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/csu/sh5 Use an assembler trampoline to call the real sta...
details: https://anonhg.NetBSD.org/src/rev/3f2087e161db
branches: trunk
changeset: 533874:3f2087e161db
user: scw <scw%NetBSD.org@localhost>
date: Wed Jul 10 13:13:47 2002 +0000
description:
Use an assembler trampoline to call the real start entrypoint, at least
until we switch to the native toolchain.
diffstat:
lib/csu/sh5/crt0.c | 10 ++++++++--
lib/csu/sh5/dot_init.h | 7 ++++++-
2 files changed, 14 insertions(+), 3 deletions(-)
diffs (54 lines):
diff -r dde529e56040 -r 3f2087e161db lib/csu/sh5/crt0.c
--- a/lib/csu/sh5/crt0.c Wed Jul 10 13:09:04 2002 +0000
+++ b/lib/csu/sh5/crt0.c Wed Jul 10 13:13:47 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.c,v 1.1 2002/07/05 13:31:28 scw Exp $ */
+/* $NetBSD: crt0.c,v 1.2 2002/07/10 13:13:47 scw Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -44,6 +44,12 @@
void _start(int argc, char **argv, char **envp, void (*cleanup)(void),
const Obj_Entry *obj, struct ps_strings *ps_strings);
+__asm( " .text \n"
+ " .align 3 \n"
+ " .globl start \n"
+ "start: pta/l __start, tr0 \n"
+ " blink tr0, r63");
+
void
_start(int argc, char **argv, char **envp, void (*cleanup)(void),
const Obj_Entry *obj, struct ps_strings *ps_strings)
@@ -84,7 +90,7 @@
* NOTE: Leave the RCS ID _after_ _start(), in case it gets placed in .text.
*/
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: crt0.c,v 1.1 2002/07/05 13:31:28 scw Exp $");
+__RCSID("$NetBSD: crt0.c,v 1.2 2002/07/10 13:13:47 scw Exp $");
#endif /* LIBC_SCCS and not lint */
#include "common.c"
diff -r dde529e56040 -r 3f2087e161db lib/csu/sh5/dot_init.h
--- a/lib/csu/sh5/dot_init.h Wed Jul 10 13:09:04 2002 +0000
+++ b/lib/csu/sh5/dot_init.h Wed Jul 10 13:13:47 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dot_init.h,v 1.1 2002/07/05 13:31:28 scw Exp $ */
+/* $NetBSD: dot_init.h,v 1.2 2002/07/10 13:13:48 scw Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -101,8 +101,13 @@
" blink tr0, r63 \n"\
".previous")
+#if __GNUC__ < 3
+#define MD_INIT_SECTION_PROLOGUE MD_SECTION_PROLOGUE(.init, _init_fallthru)
+#define MD_FINI_SECTION_PROLOGUE MD_SECTION_PROLOGUE(.fini, _fini_fallthru)
+#else
#define MD_INIT_SECTION_PROLOGUE MD_SECTION_PROLOGUE(.init, init_fallthru)
#define MD_FINI_SECTION_PROLOGUE MD_SECTION_PROLOGUE(.fini, fini_fallthru)
+#endif
#define MD_INIT_SECTION_EPILOGUE MD_SECTION_EPILOGUE(.init)
#define MD_FINI_SECTION_EPILOGUE MD_SECTION_EPILOGUE(.fini)
Home |
Main Index |
Thread Index |
Old Index