Enable gcrt1.o.

This commit is contained in:
Hidetoshi Shimokawa 1999-07-16 06:59:27 +00:00
parent 9586f34bf3
commit 480d03cbdd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48837
2 changed files with 25 additions and 2 deletions

View File

@ -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} \

View File

@ -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