From 1e5433865ca2fbb94fc1358b63b87229755f6840 Mon Sep 17 00:00:00 2001 From: simokawa Date: Fri, 16 Jul 1999 06:59:27 +0000 Subject: Enable gcrt1.o. --- lib/csu/alpha/Makefile | 6 +++++- lib/csu/alpha/crt1.c | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) (limited to 'lib/csu') diff --git a/lib/csu/alpha/Makefile b/lib/csu/alpha/Makefile index fc567d8..e7154eb 100644 --- a/lib/csu/alpha/Makefile +++ b/lib/csu/alpha/Makefile @@ -1,9 +1,10 @@ # -# $Id: Makefile,v 1.8 1999/04/09 05:56:23 jdp Exp $ +# $Id: Makefile,v 1.9 1999/04/24 02:07:17 jdp Exp $ # SRCS= crt1.c crtbegin.c crtend.c OBJS= crt1.o crtbegin.o crtend.o +OBJS+= gcrt1.o SOBJS= crtbegin.So crtend.So CFLAGS+= -Wall -Wno-unused NOMAN= true @@ -13,6 +14,9 @@ INTERNALLIB= true all: ${OBJS} ${SOBJS} +gcrt1.o: crt1.c + ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.CURDIR}/crt1.c + realinstall: .for file in ${OBJS} ${SOBJS} ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ diff --git a/lib/csu/alpha/crt1.c b/lib/csu/alpha/crt1.c index 0189e50..f0cbed6 100644 --- a/lib/csu/alpha/crt1.c +++ b/lib/csu/alpha/crt1.c @@ -30,7 +30,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: crt1.c,v 1.4 1999/01/19 06:58:31 simokawa Exp $ + * $Id: crt1.c,v 1.5 1999/04/24 02:07:17 jdp Exp $ */ #ifndef __GNUC__ @@ -49,6 +49,13 @@ extern void _init(void); extern void _fini(void); extern int main(int, char **, char **); +#ifdef GCRT +extern void _mcleanup(void); +extern void monstartup(void *, void *); +extern int eprol; +extern int etext; +#endif + char **environ; char *__progname = ""; @@ -78,7 +85,19 @@ _start(char **ap, if (&_DYNAMIC != NULL) atexit(cleanup); +#ifdef GCRT + atexit(_mcleanup); +#endif atexit(_fini); +#ifdef GCRT + monstartup(&eprol, &etext); +#endif _init(); exit( main(argc, argv, env) ); } + +#ifdef GCRT +__asm__(".text"); +__asm__("eprol:"); +__asm__(".previous"); +#endif -- cgit v1.1