From 0f02079dc07378828ff00d7d06ddc7b26db0ecfc Mon Sep 17 00:00:00 2001 From: Uwe Stuehler Date: Sat, 16 Apr 2005 17:22:45 +0000 Subject: let ld find it's _start() symbol. --- sys/arch/zaurus/stand/zboot/Makefile | 4 +--- sys/arch/zaurus/stand/zboot/crt0.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 sys/arch/zaurus/stand/zboot/crt0.c diff --git a/sys/arch/zaurus/stand/zboot/Makefile b/sys/arch/zaurus/stand/zboot/Makefile index d8282e719a1..b2bc0487cad 100644 --- a/sys/arch/zaurus/stand/zboot/Makefile +++ b/sys/arch/zaurus/stand/zboot/Makefile @@ -6,9 +6,7 @@ PROG= zboot LDFLAGS+=-nostdlib -Bstatic INSTALL_STRIP= -#LDFLAGS+=-Ttext $(LINKADDR) -N -x -noinhibit-exec -#CLEANFILES+= crt0.o -#SRCS= srt0.S +SRCS= crt0.c S= ${.CURDIR}/../../../.. diff --git a/sys/arch/zaurus/stand/zboot/crt0.c b/sys/arch/zaurus/stand/zboot/crt0.c new file mode 100644 index 00000000000..189bff0bd51 --- /dev/null +++ b/sys/arch/zaurus/stand/zboot/crt0.c @@ -0,0 +1,25 @@ +/* $OpenBSD: crt0.c,v 1.1 2005/04/16 17:22:44 uwe Exp $ */ + +/* + * Copyright (c) 2005 Uwe Stuehler + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +void _start(void) asm("_start"); + +void +_start(void) +{ + boot(0); +} -- cgit v1.2.3