summaryrefslogtreecommitdiffstats
path: root/lib/csu
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>1999-07-16 06:59:27 +0000
committersimokawa <simokawa@FreeBSD.org>1999-07-16 06:59:27 +0000
commit1e5433865ca2fbb94fc1358b63b87229755f6840 (patch)
tree46bb89351a778de1bd62ff45a9f363d5ed968205 /lib/csu
parent404cd927b959aa49252d27a31638c08cbeda1eae (diff)
downloadFreeBSD-src-1e5433865ca2fbb94fc1358b63b87229755f6840.zip
FreeBSD-src-1e5433865ca2fbb94fc1358b63b87229755f6840.tar.gz
Enable gcrt1.o.
Diffstat (limited to 'lib/csu')
-rw-r--r--lib/csu/alpha/Makefile6
-rw-r--r--lib/csu/alpha/crt1.c21
2 files changed, 25 insertions, 2 deletions
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
OpenPOWER on IntegriCloud