Explicitly link srt0.o (Standalone RunTime startup code) first.

Taken from the similar fix of mvme68k:
http://mail-index.netbsd.org/source-changes/2013/09/21/msg047819.html
> MVME PROM requires raw binaries (by objcopy -O binary) so we have to
> make sure the entry point is located at the first address of the binaries.
The original changes to switch to using MI libsa is:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016563.html

Should be pulled up to netbsd-6 branches.
(though untested since there seems no users of mvmeppc)
This commit is contained in:
tsutsui 2013-09-21 08:40:37 +00:00
parent 86bc678896
commit 6baf00efc8
3 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.booters,v 1.12 2011/01/22 19:19:20 joerg Exp $
# $NetBSD: Makefile.booters,v 1.13 2013/09/21 08:40:37 tsutsui Exp $
S?= ${.CURDIR}/../../../..
MDEC_DIR?= /usr/mdec
@ -56,6 +56,8 @@ LIBSA_DIR!= cd ${LIB_SA_DIR} && ${PRINTOBJDIR}
LIBSA= ${LIBSA_DIR}/lib/sa/libsa.a
LIBKERN= ${LIBSA_DIR}/lib/kern/libkern.a
SRTOBJ?= ${LIBSA_DIR}/srt0.o
#WRTVID_BOOT_DIR= ${.CURDIR}/../wrtvid
#WRTVID_DIR!= cd ${WRTVID_BOOT_DIR} && ${PRINTOBJDIR}
#WRTVID=${WRTVID_DIR}/wrtvid

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.10 2011/01/02 09:40:52 tsutsui Exp $
# $NetBSD: Makefile,v 1.11 2013/09/21 08:40:37 tsutsui Exp $
S!= cd ${.CURDIR}/../../../..; pwd
@ -32,7 +32,9 @@ LIBKERN= ${KERNLIB}
LIBS= ${LIBSA} ${LIBKERN}
all realall: ${LIBS}
CLEANFILES+= srt0.o
all realall: ${LIBS} srt0.o
cleandir distclean: .WAIT cleanlibdir

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.1 2011/01/02 09:40:52 tsutsui Exp $
# $NetBSD: Makefile.inc,v 1.2 2013/09/21 08:40:37 tsutsui Exp $
S!= cd ${SA_EXTRADIR}/../../../..; pwd
@ -7,7 +7,7 @@ S!= cd ${SA_EXTRADIR}/../../../..; pwd
SRC_sa= dev_net.c
SRC_here= srt0.S bugsyscalls.S exec_mvme.c parse_args.c getchar.c putchar.c
SRC_here= bugsyscalls.S exec_mvme.c parse_args.c getchar.c putchar.c
SRC_here+= if_bug.c clock.c
SRCS+= ${SRC_sa} ${SRC_here}