Delete lib directory
This commit is contained in:
parent
64da542fc6
commit
dc3f24def6
338
lib/Makefile
338
lib/Makefile
|
|
@ -1,338 +0,0 @@
|
|||
# $NetBSD: Makefile,v 1.235 2015/09/28 17:12:12 christos Exp $
|
||||
# from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
SUBDIR= csu .WAIT
|
||||
|
||||
.if (${MKGCC} != "no")
|
||||
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgcc .WAIT
|
||||
.endif
|
||||
|
||||
.if defined(__MINIX)
|
||||
#LSC MINIX libc depends on
|
||||
# - libmthread because of sys/lib/libunwind
|
||||
SUBDIR+= .WAIT
|
||||
|
||||
SUBDIR+= ../minix/lib/libsys
|
||||
SUBDIR+= ../minix/lib/libmthread
|
||||
SUBDIR+= .WAIT
|
||||
.endif # defined(__MINIX)
|
||||
SUBDIR+= libc
|
||||
SUBDIR+= .WAIT
|
||||
|
||||
.if defined(__MINIX)
|
||||
SUBDIR+= ../minix/lib/libasyn \
|
||||
../minix/lib/libaudiodriver \
|
||||
../minix/lib/libbdev \
|
||||
../minix/lib/libblockdriver \
|
||||
../minix/lib/libchardriver \
|
||||
../minix/lib/libddekit \
|
||||
../minix/lib/libdevman \
|
||||
../minix/lib/libexec \
|
||||
../minix/lib/libfsdriver \
|
||||
../minix/lib/libinputdriver \
|
||||
../minix/lib/liblwip \
|
||||
../minix/lib/libminc \
|
||||
../minix/lib/libminixfs \
|
||||
../minix/lib/libnetdriver \
|
||||
../minix/lib/libsffs \
|
||||
../minix/lib/libsockdriver \
|
||||
../minix/lib/libsockevent \
|
||||
../minix/lib/libtimers \
|
||||
../minix/lib/libusb \
|
||||
../minix/lib/libvtreefs
|
||||
|
||||
.if (${HAVE_LIBGCC} == "no")
|
||||
SUBDIR+= ../minix/lib/libgcc_s_empty
|
||||
.endif
|
||||
|
||||
.if (${MACHINE_ARCH} == "i386")
|
||||
SUBDIR+= ../minix/lib/libacpi \
|
||||
../minix/lib/libhgfs \
|
||||
../minix/lib/libvassert \
|
||||
../minix/lib/libvboxfs \
|
||||
../minix/lib/libvirtio
|
||||
.endif
|
||||
|
||||
.if (${MACHINE_ARCH} == "earm")
|
||||
SUBDIR+= ../minix/lib/libclkconf \
|
||||
../minix/lib/libgpio \
|
||||
../minix/lib/libi2cdriver
|
||||
.endif
|
||||
|
||||
.if (${MKMAGIC} == "yes")
|
||||
SUBDIR+= ../minix/lib/libmagicrt
|
||||
.endif
|
||||
|
||||
.endif # defined(__MINIX)
|
||||
#
|
||||
# The SUBDIRs above are included here for completeness but should be built
|
||||
# and installed prior to make(dependall) in this file, as libraries listed
|
||||
# below will depend on versions from DESTDIR only.
|
||||
#
|
||||
|
||||
SUBDIR+= i18n_module
|
||||
|
||||
SUBDIR+= \
|
||||
libbz2 \
|
||||
libcrypt \
|
||||
libintl libkvm libm \
|
||||
libpci libprop \
|
||||
libpuffs librmt \
|
||||
libtelnet libterminfo \
|
||||
libutil libwrap libz
|
||||
|
||||
.if !defined(BSD_MK_COMPAT_FILE)
|
||||
#SUBDIR+= libkern
|
||||
.endif
|
||||
|
||||
.if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64")
|
||||
LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
|
||||
LIBC_MACHINE_CPU?=${MACHINE_CPU}
|
||||
.if ${LIBC_MACHINE_CPU} == "arm" && empty(LIBC_MACHINE_ARCH:M*hf*)
|
||||
.if !defined(__MINIX)
|
||||
SUBDIR+= libc_vfp
|
||||
.endif # !defined(__MINIX)
|
||||
.endif
|
||||
.endif
|
||||
.if (${MKRUMP} != "no")
|
||||
SUBDIR+= librumpclient
|
||||
.endif
|
||||
.if (${MKSKEY} != "no")
|
||||
SUBDIR+= libskey
|
||||
.endif
|
||||
|
||||
.if (${MKMDNS} != "no")
|
||||
SUBDIR+= ../external/apache2/mDNSResponder/lib
|
||||
.endif
|
||||
|
||||
#SUBDIR+= ../external/bsd/am-utils/lib
|
||||
SUBDIR+= ../external/bsd/blacklist/lib
|
||||
|
||||
SUBDIR+= ../external/bsd/flex/lib
|
||||
#SUBDIR+= ../external/bsd/tre/lib
|
||||
SUBDIR+= ../external/bsd/elftoolchain/lib/libelf
|
||||
#SUBDIR+= ../external/bsd/liblzf/lib
|
||||
SUBDIR+= ../external/bsd/libpcap/lib
|
||||
|
||||
.if ${MKSLJIT} != "no"
|
||||
SUBDIR+= ../external/bsd/sljit/lib
|
||||
SUBDIR+= libbpfjit
|
||||
.endif
|
||||
|
||||
.if (${MKZFS} != "no")
|
||||
SUBDIR+= ../external/cddl/osnet/lib/libavl
|
||||
SUBDIR+= ../external/cddl/osnet/lib/libnvpair
|
||||
SUBDIR+= ../external/cddl/osnet/lib/libumem
|
||||
SUBDIR+= ../external/cddl/osnet/lib/libuutil
|
||||
.endif
|
||||
|
||||
SUBDIR+= ../external/mit/expat/lib
|
||||
|
||||
SUBDIR+= ../external/public-domain/sqlite/lib
|
||||
|
||||
#SUBDIR+= ../gnu/lib/libmalloc
|
||||
|
||||
.if (${MKGCC} != "no")
|
||||
. if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
|
||||
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc
|
||||
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp
|
||||
#SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflap
|
||||
#SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflapth
|
||||
. endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
|
||||
. if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
|
||||
# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
|
||||
# specific build area, but we get better parallelism this way.
|
||||
# We don't build compat versions of these.
|
||||
. if !defined(MLIBDIR)
|
||||
SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
|
||||
SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
|
||||
SUBDIR+= ../external/lgpl3/mpc/lib/libmpc
|
||||
. endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
|
||||
. endif
|
||||
.endif
|
||||
|
||||
#
|
||||
# Libraries that depend upon any listed previously
|
||||
# (and those that depend upon these [and ...])
|
||||
#
|
||||
#==================== 1st library dependency barrier ====================
|
||||
SUBDIR+= .WAIT
|
||||
|
||||
.if ${MKDTRACE} != "no"
|
||||
SUBDIR+= ../external/bsd/librtld_db/lib # depends on libutil
|
||||
.endif
|
||||
|
||||
.if ${MKDTRACE} != "no" || ${MKCTF} != "no"
|
||||
SUBDIR+= ../external/cddl/osnet/lib/libctf
|
||||
.endif
|
||||
|
||||
SUBDIR+= ../external/public-domain/xz/lib # depends on libpthread
|
||||
|
||||
.if (${MKCRYPTO} != "no")
|
||||
SUBDIR+= ../crypto/external/bsd/netpgp/libmj
|
||||
SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz
|
||||
.endif
|
||||
|
||||
#SUBDIR+= ../external/bsd/libdwarf/lib # depends on libelf
|
||||
SUBDIR+= ../external/mit/lua/lib # depends on libm
|
||||
SUBDIR+= libcurses # depends on libterminfo
|
||||
#SUBDIR+= libdm # depends on libprop
|
||||
SUBDIR+= libedit # depends on libterminfo
|
||||
SUBDIR+= libexecinfo # depends on libelf
|
||||
#SUBDIR+= libppath # depends on libprop
|
||||
#SUBDIR+= libperfuse # depends on libpuffs
|
||||
#SUBDIR+= libquota # depends on libprop and librpcsvc
|
||||
SUBDIR+= librefuse # depends on libpuffs
|
||||
#SUBDIR+= libisns # depends on libpthread
|
||||
.if (${MKRUMP} != "no")
|
||||
SUBDIR+= librumpuser # depends on libpthread
|
||||
SUBDIR+= librumphijack # depends on librumpclient and libpthread
|
||||
.endif
|
||||
|
||||
.if (${MKNPF} != "no")
|
||||
SUBDIR+= libnpf # depends on libprop
|
||||
.endif
|
||||
|
||||
.if (${MKCRYPTO} != "no")
|
||||
SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt
|
||||
.endif
|
||||
|
||||
SUBDIR+= ../external/bsd/file/lib # depends on libz
|
||||
|
||||
.if (${MKISCSI} != "no")
|
||||
SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
|
||||
.endif
|
||||
|
||||
.if (${MKZFS} != "no")
|
||||
SUBDIR+= ../external/cddl/osnet/lib/libzfs
|
||||
SUBDIR+= ../external/cddl/osnet/lib/libzpool
|
||||
.endif
|
||||
|
||||
.if (${MKLVM} != "no")
|
||||
SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
|
||||
.endif
|
||||
|
||||
.if (${MKBINUTILS} != "no")
|
||||
SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
|
||||
.endif
|
||||
|
||||
.if (${MKLIBCXX} != "no")
|
||||
SUBDIR+= ../external/bsd/libc++
|
||||
.endif
|
||||
|
||||
.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
|
||||
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
|
||||
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
|
||||
.endif
|
||||
|
||||
#==================== 2nd library dependency barrier ====================
|
||||
SUBDIR+= .WAIT
|
||||
|
||||
SANITIZER_DIR=../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libasan
|
||||
.if exists(${SANITIZER_DIR})
|
||||
#SUBDIR+= ${SANITIZER_DIR}
|
||||
.endif
|
||||
|
||||
SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
|
||||
|
||||
.if (${MKNPF} != "no")
|
||||
SUBDIR+= npf # depends on libnpf
|
||||
.endif
|
||||
|
||||
.if (${MKATF} != "no")
|
||||
SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
|
||||
.endif
|
||||
|
||||
.if (${MKKYUA} != "no")
|
||||
SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
|
||||
.endif
|
||||
|
||||
SUBDIR+= libform # depends on libcurses
|
||||
SUBDIR+= libmenu # depends on libcurses
|
||||
#SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
|
||||
.if (${MKRUMP} != "no")
|
||||
SUBDIR+= librump # depends on librumpuser
|
||||
.endif
|
||||
|
||||
.if (${MKKERBEROS} != "no")
|
||||
SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
|
||||
# libedit, libterminfo,
|
||||
.endif
|
||||
|
||||
.if (${MKCRYPTO} != "no")
|
||||
#SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
|
||||
SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
|
||||
.endif
|
||||
|
||||
SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto
|
||||
.if ${MKDTRACE} != "no"
|
||||
SUBDIR+= ../external/bsd/libproc/lib # depends on libstdc++, libctf
|
||||
.endif
|
||||
SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
|
||||
|
||||
.if (${MKLDAP} != "no")
|
||||
SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
|
||||
.endif
|
||||
|
||||
#==================== 3rd library dependency barrier ====================
|
||||
SUBDIR+= .WAIT
|
||||
|
||||
SUBDIR+= ../external/bsd/bind/lib # depends on heimdal, libcrypto
|
||||
|
||||
.if ${MKDTRACE} != "no"
|
||||
SUBDIR+= ../external/cddl/osnet/lib/libdtrace # depends on libproc
|
||||
.endif
|
||||
|
||||
.if (${MKRUMP} != "no")
|
||||
SUBDIR+= librumpdev # depends on librump
|
||||
SUBDIR+= librumpnet # depends on librump
|
||||
SUBDIR+= librumpvfs # depends on librump
|
||||
.endif
|
||||
|
||||
.if (${MKPAM} != "no")
|
||||
SUBDIR+= libpam # depends on heimdal
|
||||
.endif
|
||||
|
||||
.if (${MKCRYPTO} != "no")
|
||||
SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
|
||||
.endif
|
||||
|
||||
SUBDIR+= ../external/bsd/mdocml/lib
|
||||
|
||||
.if (${MKRUMP} != "no")
|
||||
#==================== 4th library dependency barrier ====================
|
||||
SUBDIR+= .WAIT
|
||||
|
||||
SUBDIR+= libukfs # depends on librumpvfs, librump
|
||||
|
||||
.if (${MKTPM} != "no")
|
||||
SUBDIR+= ../crypto/external/cpl/trousers/lib
|
||||
.endif
|
||||
|
||||
#==================== 5th library dependency barrier ====================
|
||||
SUBDIR+= .WAIT
|
||||
|
||||
SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
|
||||
|
||||
.if (${MKTPM} != "no")
|
||||
SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
|
||||
.endif
|
||||
|
||||
.if !defined(BSD_MK_COMPAT_FILE)
|
||||
SUBDIR+= ../sys/rump/dev/lib
|
||||
SUBDIR+= ../sys/rump/fs/lib
|
||||
SUBDIR+= ../sys/rump/kern/lib
|
||||
SUBDIR+= ../sys/rump/net/lib
|
||||
.endif
|
||||
.endif
|
||||
|
||||
# Lua bindings come last, they might depend on anything
|
||||
SUBDIR+= lua
|
||||
|
||||
# Needed by rump and rescue which are outside the smbfs tree
|
||||
#SUBDIR+= ../external/bsd/smbfs/lib
|
||||
|
||||
.include <bsd.buildinstall.mk>
|
||||
.include <bsd.subdir.mk>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.7 2012/03/21 05:39:21 matt Exp $
|
||||
|
||||
WARNS?= 5
|
||||
127
lib/bumpversion
127
lib/bumpversion
|
|
@ -1,127 +0,0 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: bumpversion,v 1.10 2003/07/26 19:24:24 salo Exp $
|
||||
#
|
||||
# Copyright (c) 1993 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed for the
|
||||
# NetBSD Project. See http://www.NetBSD.org/ for
|
||||
# information about NetBSD.
|
||||
# 4. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (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: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
|
||||
while :
|
||||
do case "$1" in
|
||||
# -c says to create new shlib_version files
|
||||
-c)
|
||||
create=TRUE
|
||||
shift ;;
|
||||
|
||||
# -n sets 'do nothing mode'
|
||||
-n)
|
||||
donothing=TRUE
|
||||
shift ;;
|
||||
|
||||
# -m says to bump major number, rather than minor number
|
||||
-m)
|
||||
bumpmajor=TRUE
|
||||
shift ;;
|
||||
|
||||
*)
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $# = 0 ] ; then
|
||||
echo "usage: $0 [-c] [-m] [-n] dir ..."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
TMP=/tmp/bump$$
|
||||
error=0
|
||||
|
||||
trap 'rm -f $TMP ; exit 1' 1 2 3 13 15
|
||||
|
||||
for dir in $@ ; do
|
||||
versf=$dir/shlib_version
|
||||
|
||||
if [ "X$create" != "X" ] ; then
|
||||
if [ ! -d $dir ] ; then
|
||||
echo $0: $dir is not a directory 1>&2
|
||||
error=1
|
||||
continue
|
||||
fi
|
||||
if [ -e $versf ] ; then
|
||||
echo $0: $versf exists\; not replacing 1>&2
|
||||
error=1
|
||||
continue
|
||||
fi
|
||||
else
|
||||
if [ ! -e $versf ] ; then
|
||||
echo $0: $versf does not exist 1>&2
|
||||
error=1
|
||||
continue
|
||||
fi
|
||||
if [ ! -f $versf ] ; then
|
||||
echo $0: $versf is not a regular file 1>&2
|
||||
error=1
|
||||
continue
|
||||
fi
|
||||
if [ ! -r $versf ] ; then
|
||||
echo $0: $versf is not readable 1>&2
|
||||
error=1
|
||||
continue
|
||||
fi
|
||||
if [ ! -w $versf ] ; then
|
||||
echo $0: $versf is not a writable 1>&2
|
||||
error=1
|
||||
continue
|
||||
fi
|
||||
|
||||
. $versf
|
||||
fi
|
||||
|
||||
if [ "X$create" != "X" ] ; then
|
||||
nmajor=0
|
||||
nminor=0
|
||||
elif [ "X$bumpmajor" != "X" ] ; then
|
||||
nmajor=`expr $major + 1`
|
||||
nminor=0
|
||||
else
|
||||
nmajor=$major
|
||||
nminor=`expr $minor + 1`
|
||||
fi
|
||||
|
||||
if [ "X$donothing" = "X" ] ; then
|
||||
echo major=$nmajor > $TMP
|
||||
echo minor=$nminor >> $TMP
|
||||
mv $TMP $versf
|
||||
else
|
||||
echo "$0: $versf -> $nmajor.$nminor"
|
||||
fi
|
||||
done
|
||||
|
||||
exit $error
|
||||
155
lib/checkoldver
155
lib/checkoldver
|
|
@ -1,155 +0,0 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: checkoldver,v 1.3 2008/04/30 13:10:50 martin Exp $
|
||||
#
|
||||
# Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This code is derived from software contributed to The NetBSD Foundation
|
||||
# by Christos Zoulas.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# checkoldver [dir ...]
|
||||
#
|
||||
# Looks in the given directories for old shared libraries and lists them
|
||||
# Useful for: 'checkoldver /usr/lib | xargs rm -f'
|
||||
|
||||
delete() {
|
||||
obsol="$1.so"
|
||||
if [ ! -z "$2" ]
|
||||
then
|
||||
obsol="$obsol.$2"
|
||||
fi
|
||||
if [ ! -z "$3" ]
|
||||
then
|
||||
obsol="$obsol.$3"
|
||||
fi
|
||||
if [ ! -z "$4" ]
|
||||
then
|
||||
obsol="$obsol.$4"
|
||||
fi
|
||||
echo $PWD/$obsol
|
||||
}
|
||||
|
||||
comparelib() {
|
||||
OIFS="$IFS"
|
||||
IFS="$IFS."
|
||||
set -- $1
|
||||
IFS="$OIFS"
|
||||
if [ "$3" = "[0-9]*" ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "$libmajor" ]
|
||||
then
|
||||
libname="$1"
|
||||
libmajor="$3"
|
||||
libminor="$4"
|
||||
libtiny="$5"
|
||||
return
|
||||
fi
|
||||
if [ "$libmajor" -lt "$3" ]
|
||||
then
|
||||
delete "$libname" "$libmajor" "$libminor" "$libtiny"
|
||||
libmajor="$3"
|
||||
libminor="$4"
|
||||
libtiny="$5"
|
||||
return
|
||||
elif [ "$3" -lt "$libmajor" ]
|
||||
then
|
||||
delete "$libname" "$3" "$4" "$5"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "$libminor" ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
if [ "$libminor" -lt "$4" ]
|
||||
then
|
||||
delete "$libname" "$libmajor" "$libminor" "$libtiny"
|
||||
libmajor="$3"
|
||||
libminor="$4"
|
||||
libtiny="$5"
|
||||
return
|
||||
elif [ "$4" -lt "$libminor" ]
|
||||
then
|
||||
delete "$libname" "$3" "$4" "$5"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "$libtiny" ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
if [ "$libtiny" -lt "$5" ]
|
||||
then
|
||||
delete "$libname" "$libmajor" "$libminor" "$libtiny"
|
||||
libmajor="$3"
|
||||
libminor="$4"
|
||||
libtiny="$5"
|
||||
return
|
||||
elif [ "$5" -lt "$libminor" ]
|
||||
then
|
||||
delete "$libname" "$3" "$4" "$5"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
processonedir() {
|
||||
cd "$1"
|
||||
for lib in lib*.so
|
||||
do
|
||||
lib="${lib#lib}"
|
||||
lib="${lib%.so}"
|
||||
|
||||
libmajor=
|
||||
libminor=
|
||||
libtiny=
|
||||
for link in lib$lib.so.[0-9]*.[0-9]*.[0-9]*
|
||||
do
|
||||
comparelib "$link"
|
||||
done
|
||||
|
||||
libmajor=
|
||||
libminor=
|
||||
libtiny=
|
||||
for link in lib$lib.so.[0-9]*.[0-9]*
|
||||
do
|
||||
comparelib "$link"
|
||||
done
|
||||
|
||||
libmajor=
|
||||
libminor=
|
||||
libtiny=
|
||||
for link in lib$lib.so.[0-9]*
|
||||
do
|
||||
comparelib "$link"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
for i
|
||||
do
|
||||
processonedir "$i"
|
||||
done
|
||||
232
lib/checkver
232
lib/checkver
|
|
@ -1,232 +0,0 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: checkver,v 1.16 2013/02/17 02:36:21 christos Exp $
|
||||
#
|
||||
# Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This code is derived from software contributed to The NetBSD Foundation
|
||||
# by Eric Haszlakiewicz.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# checkver -
|
||||
# Check for libraries that appear to be newer than the
|
||||
# one we're about to install.
|
||||
#
|
||||
# checkver [-q] [-v shlib_version_file] -d [installedlibdir [library name]]"
|
||||
# checkver [-q] [-v shlib_version_file] -s [setlistdir [library name]]"
|
||||
# checkver [-q] [-v shlib_version_file] -f liblistfile [library name]"
|
||||
#
|
||||
# One of -d, -s or -f must be specified.
|
||||
#
|
||||
# all: If library name is not specified it is assumed to
|
||||
# be the name of the current directory.
|
||||
#
|
||||
# -d: Checks the version against the installed libraries.
|
||||
# If no further arguments are given "/usr/lib" is
|
||||
# used as the location of installed libraries.
|
||||
#
|
||||
# -s: Checks the version against the sets. If no argument
|
||||
# follows the sets directory defaults to "/usr/src/distrib/sets/lists".
|
||||
# The directory may be specified as either the top of the
|
||||
# source tree or as the lists directory.
|
||||
#
|
||||
# -f: Checks the version against the provided list. A filename
|
||||
# must be supplied.
|
||||
#
|
||||
# -v: Specify the filename of the shlib_version file. Defaults
|
||||
# to "./shlib_version".
|
||||
#
|
||||
# This script produces no output if all library version are not
|
||||
# large than the source version. If an installed library with a
|
||||
# version greater than the source is found, checkver prints a
|
||||
# header and a list of the names of the offending installed libraries.
|
||||
#
|
||||
# The header may be supressed by passing "-q" as the first argument.
|
||||
#
|
||||
|
||||
TMP=/tmp/checkver.$$
|
||||
PROG="$(basename "$0")"
|
||||
# Can't trap 11 (SEGV) in the Real Bourne Shell, since it uses it for
|
||||
# internal malloc!
|
||||
trap "exit 2" 1 2 3 4 5 6 7 8 10 12 13 14 15
|
||||
trap "[ -d $TMP ] && rm -rf $TMP" 0
|
||||
|
||||
Usage() {
|
||||
cat << EOF 1>&2
|
||||
Usage: $PROG [-q] [-v version_file] -d [installedlibdir [library name]]
|
||||
$PROG [-q] [-v version_file] -s [setlistdir [library name]]
|
||||
$PROG [-q] [-v version_file] -f liblistfile [library name]
|
||||
$PROG is a script that looks for installed libraries with
|
||||
versions greater than that in the version file.
|
||||
For more information, read the comments.
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
basedir=/usr/src
|
||||
setsdir=$basedir/distrib/sets/lists
|
||||
libdir=/usr/lib
|
||||
shlib_version=./shlib_version
|
||||
|
||||
error=0
|
||||
quiet=0
|
||||
usedir=0
|
||||
usefile=0
|
||||
usesets=0
|
||||
CWD=$(pwd)
|
||||
|
||||
fixone() {
|
||||
local instmajor=$(basename $1 | awk 'BEGIN { FS="." } { print $3 }')
|
||||
local instminor=$(basename $1 | awk 'BEGIN { FS="." } { print $4 }')
|
||||
local instteeny=$(basename $1 | awk 'BEGIN { FS="." } { print $5 + 0 }')
|
||||
local ms="The following libraries have versions greater than the source"
|
||||
|
||||
# If they're greater than the source, complain.
|
||||
if [ "0$major" -eq "0$instmajor" ]; then
|
||||
if [ "0$minor" -eq "0$instminor" ]; then
|
||||
if [ "0$teeny" -lt "0$instteeny" ]; then
|
||||
if [ $error -eq 0 -a $quiet -eq 0 ]; then
|
||||
echo "$ms" 1>&2
|
||||
fi
|
||||
echo $1 1>&2
|
||||
error=1
|
||||
fi
|
||||
elif [ "0$minor" -lt "0$instminor" ]; then
|
||||
if [ $error -eq 0 -a $quiet -eq 0 ]; then
|
||||
echo "$ms" 1>&2
|
||||
fi
|
||||
echo $1 1>&2
|
||||
error=1
|
||||
fi
|
||||
elif [ "0$major" -lt "0$instmajor" ]; then
|
||||
if [ $error -eq 0 -a $quiet -eq 0 ]; then
|
||||
echo "$ms" 1>&2
|
||||
fi
|
||||
echo $1 1>&2
|
||||
error=1
|
||||
fi
|
||||
}
|
||||
|
||||
while getopts df:shqv: f; do
|
||||
case $f in
|
||||
d) usedir=1
|
||||
if [ $usefile -eq 1 -o $usesets -eq 1 ]; then
|
||||
Usage
|
||||
fi;;
|
||||
f) usefile=1; arg1=$OPTARG
|
||||
if [ $usedir -eq 1 -o $usesets -eq 1 ]; then
|
||||
Usage
|
||||
fi;;
|
||||
s) usesets=1
|
||||
if [ $usedir -eq 1 -o $usefile -eq 1 ]; then
|
||||
Usage
|
||||
fi;;
|
||||
v) shlib_version=$OPTARG;;
|
||||
q) quiet=1;;
|
||||
*) Usage;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $(($OPTIND - 1))
|
||||
|
||||
if [ $usedir -eq 0 -a $usefile -eq 0 -a $usesets -eq 0 ]; then
|
||||
Usage
|
||||
fi
|
||||
|
||||
if [ $usefile -eq 1 ]; then
|
||||
LIBLIST="$arg1"
|
||||
else
|
||||
if ! mkdir -m 0700 $TMP; then
|
||||
echo "$PROG: Unable to create temp directory." 1>&2
|
||||
exit 2
|
||||
fi
|
||||
LIBLIST=$TMP/libs.lst
|
||||
fi
|
||||
|
||||
# Build list from the installed libraries.
|
||||
if [ $usedir -eq 1 ]; then
|
||||
if [ -n "$1" ]; then
|
||||
libdir="$1"
|
||||
fi
|
||||
for f in $libdir; do
|
||||
ls $f/lib*.so.*.*
|
||||
done > $LIBLIST 2> /dev/null
|
||||
fi
|
||||
|
||||
# Build list from set lists. Parameter may be either
|
||||
# the "lists" directory or the top of the source tree.
|
||||
if [ $usesets -eq 1 ]; then
|
||||
if [ -n "$1" ]; then
|
||||
setsdir="$1"
|
||||
if [ -d "$setsdir/distrib/sets/lists" ]; then
|
||||
setsdir="$setsdir/distrib/sets/lists"
|
||||
fi
|
||||
fi
|
||||
(cd $setsdir;
|
||||
cat */[a-z]* |
|
||||
grep '^./usr/lib/lib.*\.so\.[0-9][0-9]*\.[0-9][0-9]*' |
|
||||
sort -u > $LIBLIST)
|
||||
fi
|
||||
|
||||
#
|
||||
# The file $LIBLIST now contains a list of libraries.
|
||||
#
|
||||
if [ -z "$2" ]; then
|
||||
makefile=$CWD/Makefile
|
||||
libname=$(grep '^LIB=' $makefile | sed -e 's/^LIB=[[:space:]]*//')
|
||||
|
||||
# Assume the library name is the name of the current directory.
|
||||
if [ -z "$libname" ]; then
|
||||
libname=$(basename $CWD)
|
||||
fi
|
||||
else
|
||||
libname="$2"
|
||||
fi
|
||||
echo $libname | grep "^lib" 1>&2 2> /dev/null
|
||||
if [ $? != 0 ]; then
|
||||
libname="lib$libname"
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f $shlib_version ]; then
|
||||
echo "$PROG: unable to find $shlib_version" 1>&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Grab major and minor numbers from the source.
|
||||
. $shlib_version
|
||||
|
||||
if [ -z "$minor" -o -z "$major" ]; then
|
||||
echo "$PROG: $shlib_version doesn't contain the version." 1>&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Find every shared object library with the same base name.
|
||||
for instlib in $(grep $libname.so "$LIBLIST"); do
|
||||
# Grab the major and minor from the installed library.
|
||||
fixone "$instlib"
|
||||
done
|
||||
|
||||
exit $error
|
||||
210
lib/checkvers
210
lib/checkvers
|
|
@ -1,210 +0,0 @@
|
|||
#!/bin/ksh
|
||||
# $NetBSD: checkvers,v 1.7 2008/04/30 13:10:50 martin Exp $
|
||||
#
|
||||
# Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This code is derived from software contributed to The NetBSD Foundation
|
||||
# by Eric Haszlakiewicz.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# checkvers [-q] [systemlibdir [library name]]
|
||||
#
|
||||
# This is a wrapper script around checkver. It will find
|
||||
# all directories withing the current directory containing
|
||||
# a shlib_version file and call checkver for each.
|
||||
#
|
||||
# As with checkver, a list of directories of installed libraries
|
||||
# may be specified. This will replace the default of "/usr/lib"
|
||||
# and search there instead.
|
||||
#
|
||||
# A library name may also be specified. However, this script
|
||||
# will not work correctly if it finds shlib_version files
|
||||
# corresponding to a different library.
|
||||
#
|
||||
# This script produces no output if all library version are ok.
|
||||
# If the versions aren't ok the header will be displayed once
|
||||
# followed by a list of problematic libraries.
|
||||
#
|
||||
|
||||
# checkvers:
|
||||
# if "-s", build list, pass with -f to checkver.
|
||||
# if "-d", build list, pass with -f to checkver.
|
||||
# if "-f", pass with -f to checkver.
|
||||
|
||||
|
||||
# Cleanup on exit.
|
||||
TMP=/tmp/checkvers.$$
|
||||
trap "exit 2" 1 2 3 4 5 6 7 8 10 11 12 13 14 15
|
||||
trap "rm -rf $TMP" 0
|
||||
|
||||
Usage ( ) {
|
||||
echo "Usage: $1 [-q] -d [installedlibdir [library name]]"
|
||||
echo " $1 [-q] -s [setlistdir [library name]]"
|
||||
echo " $1 [-q] -f liblistfile [library name]"
|
||||
}
|
||||
|
||||
basedir=/usr/src
|
||||
setsdir=$basedir/distrib/sets/lists
|
||||
libdir=/usr/lib
|
||||
|
||||
error=0
|
||||
quiet=0
|
||||
usedir=0
|
||||
usefile=0
|
||||
usesets=0
|
||||
CWD=`pwd`
|
||||
args=`getopt "df:shq" "$@"`
|
||||
if [ $? -ne 0 ] ; then
|
||||
Usage $0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
set -- $args
|
||||
|
||||
while . ; do
|
||||
case "$1" in
|
||||
-d) usedir=1 ; shift
|
||||
if [ $usefile -eq 1 -o $usesets -eq 1 ]; then
|
||||
Usage $0 ; exit 2
|
||||
fi;;
|
||||
-f) usefile=1 ; arg1=$2 ; shift ; shift
|
||||
if [ $usedir -eq 1 -o $usesets -eq 1 ]; then
|
||||
Usage $0 ; exit 2
|
||||
fi;;
|
||||
-s) usesets=1 ; shift
|
||||
if [ $usedir -eq 1 -o $usefile -eq 1 ]; then
|
||||
Usage $0 ; exit 2
|
||||
fi;;
|
||||
-h) Usage $0 ; exit 0;;
|
||||
-q) quiet=1 ; shift;;
|
||||
--) shift ; break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $usedir -eq 0 -a $usefile -eq 0 -a $usesets -eq 0 ] ; then
|
||||
Usage $0 ; exit 2
|
||||
fi
|
||||
if [ $usefile -eq 0 -a $# -gt 2 ] ; then
|
||||
Usage $0 ; exit 2
|
||||
fi
|
||||
if [ $usefile -eq 1 -a $# -gt 1 ] ; then
|
||||
Usage $0 ; exit 2
|
||||
fi
|
||||
|
||||
#-------------------------#
|
||||
|
||||
QUIET=
|
||||
LIBNAME=
|
||||
|
||||
# Supress header.
|
||||
if [ quiet -eq 1 ] ; then
|
||||
QUIET="-q"
|
||||
fi
|
||||
|
||||
if ! mkdir -m 700 $TMP ; then
|
||||
echo "$0: Unable to create temp directory."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ $usefile -eq 1 ] ; then
|
||||
# Just pass the file name to checkver.
|
||||
LIBLIST="$arg1"
|
||||
else
|
||||
LIBLIST=$TMP/libs.lst
|
||||
fi
|
||||
|
||||
# Build list from the installed libraries.
|
||||
if [ $usedir -eq 1 ] ; then
|
||||
if [ "X$1" != "X" ] ; then
|
||||
libdir="$1"
|
||||
fi
|
||||
for f in $libdir ; do
|
||||
ls $f/lib*.so.*.*
|
||||
done > $LIBLIST 2> /dev/null
|
||||
fi
|
||||
|
||||
# Build list from set lists. Parameter may be either
|
||||
# the "lists" directory or the top of the source tree.
|
||||
if [ $usesets -eq 1 ] ; then
|
||||
if [ "X$1" != "X" ] ; then
|
||||
setsdir="$1"
|
||||
if [ -d "$setsdir/distrib/sets/lists" ] ; then
|
||||
setsdir="$setsdir/distrib/sets/lists"
|
||||
fi
|
||||
fi
|
||||
(cd $setsdir ;
|
||||
cat */[a-z]* | grep '^./usr/lib/lib.*\.so\.[0-9][0-9]*\.[0-9][0-9]*' \
|
||||
| sort -u > $LIBLIST
|
||||
)
|
||||
fi
|
||||
|
||||
if [ "X$2" != "X" ] ; then
|
||||
LIBNAME="$2"
|
||||
fi
|
||||
|
||||
EXECDIR=`eval "(cd \`dirname $0\` ; pwd)"`
|
||||
|
||||
CWD=`pwd`
|
||||
VERFILES=`find $CWD -name shlib_version -print`
|
||||
|
||||
for f in $VERFILES ; do
|
||||
# Call checkver. We always have a list of libraries
|
||||
# here, whether given to us or built, so always
|
||||
# pass the -f flag.
|
||||
(cd `dirname $f` ;
|
||||
"sh $EXECDIR"/checkver $QUIET -f "$LIBLIST" "$LIBNAME" ;
|
||||
exit $?)
|
||||
ERR=$?
|
||||
if [ $ERR -eq 2 ] ; then
|
||||
echo "$0: checkver failed. LIBLIST=$LIBLIST $LIBNAME=$LIBNAME"
|
||||
exit 2
|
||||
fi
|
||||
if [ $ERR -ne 0 ] ; then
|
||||
QUIET="-q"
|
||||
error=1
|
||||
fi
|
||||
|
||||
if [ "X$LIBNAME" = "X" ] ; then
|
||||
# Build the library name from the directory it's in.
|
||||
libname=`dirname $f`
|
||||
libname=`basename $libname`
|
||||
if ! echo $libname | grep -q "^lib" ; then
|
||||
libname="lib$libname"
|
||||
fi
|
||||
else
|
||||
libname="$LIBNAME"
|
||||
fi
|
||||
|
||||
if [ -e $TMP/$libname ] ; then
|
||||
echo "Warning: $libname sources encountered multiple times."
|
||||
echo " Previous location: `cat $TMP/$libname`"
|
||||
echo " Current location: `dirname $f`"
|
||||
fi
|
||||
echo "`dirname $f`" > $TMP/$libname
|
||||
|
||||
done
|
||||
|
||||
exit $error
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
# $NetBSD: Makefile,v 1.35 2014/08/10 23:25:49 matt Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
.if defined(__MINIX)
|
||||
USE_BITCODE:= no
|
||||
.endif # defined(__MINIX)
|
||||
|
||||
CSU_MACHINE_ARCH?= ${MACHINE_ARCH}
|
||||
CSU_MACHINE_CPU?= ${MACHINE_CPU}
|
||||
|
||||
.if !empty(CSU_MACHINE_ARCH:Mearm*)
|
||||
ARCHDIR:= ${.CURDIR}/arch/earm
|
||||
.elif exists(${.CURDIR}/arch/${CSU_MACHINE_ARCH}/Makefile.inc)
|
||||
ARCHDIR:= ${.CURDIR}/arch/${CSU_MACHINE_ARCH}
|
||||
.elif exists(${.CURDIR}/arch/${CSU_MACHINE_CPU}/Makefile.inc)
|
||||
ARCHDIR:= ${.CURDIR}/arch/${CSU_MACHINE_CPU}
|
||||
.else
|
||||
.error Architecture (${CSU_MACHINE_ARCH} or ${CSU_MACHINE_CPU}) unsupported
|
||||
.endif
|
||||
|
||||
|
||||
.PATH: ${ARCHDIR}
|
||||
.include "${ARCHDIR}/Makefile.inc"
|
||||
.include "${.CURDIR}/common/Makefile.inc"
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2014/08/10 05:47:36 matt Exp $
|
||||
|
||||
CPPFLAGS+= -I${ARCHDIR}
|
||||
CPPFLAGS+= -DHAVE_INITFINI_ARRAY
|
||||
#CPPFLAGS+= -DELF_NOTE_MARCH_DESC=\"${CSU_MACHINE_ARCH}\"
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.1 2014/08/10 05:47:36 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <aarch64/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.1 2014/08/10 05:47:36 matt Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
_ENTRY(__start)
|
||||
/*
|
||||
* void ___start(void (*cleanup)(void), const Obj_Entry *obj,
|
||||
* struct ps_strings *ps_strings);
|
||||
*/
|
||||
b ___start
|
||||
END(__start)
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
/* $NetBSD: crtbegin.h,v 1.1 2014/08/10 05:47:36 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
static void __do_global_ctors_aux(void) __attribute__((__constructor__)) __used;
|
||||
#ifdef SHARED
|
||||
static void __do_global_dtors_aux(void) __attribute__((__destructor__)) __used;
|
||||
#endif
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.1 2014/08/10 05:47:36 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <aarch64/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.1 2014/08/10 05:47:36 matt Exp $")
|
||||
|
||||
.section .eh_frame, "a", %progbits
|
||||
.p2align 3
|
||||
.global __EH_FRAME_END__
|
||||
.hidden __EH_FRAME_END__
|
||||
__EH_FRAME_END__:
|
||||
.space 8
|
||||
|
||||
.section .jcr, "aw", %progbits
|
||||
.p2align 3
|
||||
.global __JCR_END__
|
||||
.hidden __JCR_END__
|
||||
__JCR_END__:
|
||||
.space 8
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2014/08/10 05:47:36 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <aarch64/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2014/08/10 05:47:36 matt Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
/*
|
||||
* Since ARM EABI uses .init_array/.fini_array,
|
||||
* there is no need for .init/.fini
|
||||
*/
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2014/08/10 05:47:36 matt Exp $ */
|
||||
|
||||
/* no need for anything here since AAPCS64 uses .init_array/.fini_array */
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2013/07/11 16:40:27 matt Exp $
|
||||
|
||||
CPPFLAGS+= -I${ARCHDIR} -DELFSIZE=64
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.1 2013/07/11 16:40:27 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <alpha/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.1 2013/07/11 16:40:27 matt Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
/*
|
||||
* Assumes kernel (or ld_elf.so) passes the following parameters to
|
||||
* user-space in registers:
|
||||
*
|
||||
* a0 stack pointer
|
||||
* a1 cleanup
|
||||
* a2 Obj_Entry
|
||||
* a3 ps_strings
|
||||
*/
|
||||
|
||||
LEAF(__start, 4)
|
||||
LDGP(pv)
|
||||
mov a1, a0 /* cleanup */
|
||||
mov a2, a1 /* Obj_Entry */
|
||||
mov a3, a2 /* ps_strings */
|
||||
CALL(___start)
|
||||
END(__start)
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/* $NetBSD: crtbegin.h,v 1.1 2013/07/11 16:40:27 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <alpha/asm.h>
|
||||
|
||||
/* Assume we need to reload our GP. */
|
||||
__asm( ".pushsection .init"
|
||||
"\n\t" "br $29, 1f"
|
||||
"\n\t" "1: ldgp $29, 0($29)"
|
||||
"\n\t" "unop"
|
||||
"\n\t" "jsr $26, __do_global_ctors_aux"
|
||||
"\n\t" ".p2align 3"
|
||||
"\n\t" ".popsection");
|
||||
|
||||
/* Assume we need to reload our GP. */
|
||||
__asm( ".pushsection .fini"
|
||||
"\n\t" "br $29, 1f"
|
||||
"\n\t" "1: ldgp $29, 0($29)"
|
||||
"\n\t" "unop"
|
||||
"\n\t" "jsr $26, __do_global_dtors_aux"
|
||||
"\n\t" ".p2align 3"
|
||||
"\n\t" ".popsection");
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.1 2013/07/11 16:40:27 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <alpha/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.1 2013/07/11 16:40:27 matt Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.p2align 3
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
.word 0
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.p2align 3
|
||||
.global __DTOR_LIST_END__
|
||||
.hidden __DTOR_LIST_END__
|
||||
__DTOR_LIST_END__:
|
||||
.word 0
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.p2align 3
|
||||
.word 0
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.p2align 3
|
||||
.word 0
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
/* $NetBSD: crtfm.c,v 1.1 2013/08/05 13:38:35 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Wasabi Systems, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Jason R. Thorpe for Wasabi Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the NetBSD Project by
|
||||
* Wasabi Systems, Inc.
|
||||
* 4. The name of Wasabi Systems, Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Support for the GCC "-ffast-math" option on the Alpha.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <machine/fpu.h>
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
/*
|
||||
* Must provide this wrapper around sysarch(2) so that statically-linked
|
||||
* programs work properly.
|
||||
*/
|
||||
|
||||
extern void __alpha_sysarch(int, void *);
|
||||
|
||||
__asm(".ent __alpha_sysarch 0 ;\n"
|
||||
"__alpha_sysarch: ;\n"
|
||||
" ldiq $0, 165 ;\n" /* v0 = SYS_sysarch */
|
||||
" call_pal 0x0083 ;\n" /* PAL_OSF1_callsys */
|
||||
" ret $31,($26),1 ;\n"
|
||||
".end __alpha_sysarch");
|
||||
|
||||
static void __attribute__((__constructor__))
|
||||
__alpha_set_fast_math(void)
|
||||
{
|
||||
struct alpha_fp_c_args args;
|
||||
|
||||
args.fp_c = IEEE_MAP_DMZ|IEEE_MAP_UMZ;
|
||||
__alpha_sysarch(ALPHA_SET_FP_C, &args);
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2013/07/11 16:40:27 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <alpha/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2013/07/11 16:40:27 matt Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.global _init
|
||||
.type _init, @function
|
||||
_init:
|
||||
LDGP(pv)
|
||||
lda sp, -32(sp)
|
||||
stq ra, 0(sp)
|
||||
stq gp, 8(sp)
|
||||
.p2align 5
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.global _fini
|
||||
.type _fini, @function
|
||||
_fini:
|
||||
LDGP(pv)
|
||||
lda sp, -32(sp)
|
||||
stq ra, 0(sp)
|
||||
stq gp, 8(sp)
|
||||
.p2align 5
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2013/07/11 16:40:27 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <alpha/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.1 2013/07/11 16:40:27 matt Exp $")
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
ldq gp, 8(sp)
|
||||
ldq ra, 0(sp)
|
||||
lda sp, 32(sp)
|
||||
RET
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
ldq gp, 8(sp)
|
||||
ldq ra, 0(sp)
|
||||
lda sp, 32(sp)
|
||||
RET
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.7 2013/09/10 22:00:01 matt Exp $
|
||||
|
||||
CPPFLAGS+= -I${ARCHDIR}
|
||||
.if (!empty(CPUFLAGS) && ${CPUFLAGS:M-mabi=aapcs*} != "")
|
||||
CPPFLAGS+= -DHAVE_INITFINI_ARRAY
|
||||
.endif
|
||||
CPPFLAGS+= -DELF_NOTE_MARCH_DESC=\"${CSU_MACHINE_ARCH}\"
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.3 2012/08/11 07:25:44 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <arm/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.3 2012/08/11 07:25:44 matt Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
_ENTRY(__start)
|
||||
/*
|
||||
* We need to swap ps_strings and cleanup
|
||||
*/
|
||||
mov ip, r0 /* ps_strings -> tmp */
|
||||
mov r0, r2 /* cleanup -> ps_strings */
|
||||
mov r2, ip /* tmp -> ps_strings */
|
||||
|
||||
/* Ensure the stack is properly aligned before calling C code. */
|
||||
bic sp, sp, #7
|
||||
|
||||
/*
|
||||
* void ___start(void (*cleanup)(void),
|
||||
* const Obj_Entry *obj,
|
||||
* struct ps_strings *ps_strings);
|
||||
*/
|
||||
|
||||
b ___start
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
/* $NetBSD: crtbegin.h,v 1.1 2013/06/27 21:24:39 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
__asm(
|
||||
".pushsection .init, \"ax\", %progbits"
|
||||
"\n\t" "bl __do_global_ctors_aux"
|
||||
"\n\t" ".popsection");
|
||||
|
||||
__asm(
|
||||
".pushsection .fini, \"ax\", %progbits"
|
||||
"\n\t" "bl __do_global_dtors_aux"
|
||||
"\n\t" ".popsection");
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.2 2012/08/11 07:26:25 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <arm/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.2 2012/08/11 07:26:25 matt Exp $")
|
||||
|
||||
.section .ctors, "aw", %progbits
|
||||
.p2align 2
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
.space 4
|
||||
|
||||
.section .dtors, "aw", %progbits
|
||||
.p2align 2
|
||||
.global __DTOR_LIST_END__
|
||||
.hidden __DTOR_LIST_END__
|
||||
__DTOR_LIST_END__:
|
||||
.space 4
|
||||
|
||||
.section .eh_frame, "a", %progbits
|
||||
.p2align 2
|
||||
.space 4
|
||||
|
||||
.section .jcr, "aw", %progbits
|
||||
.p2align 2
|
||||
.space 4
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.2 2012/08/11 01:33:36 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.2 2012/08/11 01:33:36 matt Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
.section ".init", "ax", %progbits
|
||||
.align 0
|
||||
.globl _init
|
||||
.type _init,%function
|
||||
_init:
|
||||
mov ip, sp
|
||||
stmfd sp!, {fp, ip, lr, pc}
|
||||
sub fp, ip, #4
|
||||
|
||||
.section ".fini", "ax", %progbits
|
||||
.align 0
|
||||
.globl _fini
|
||||
.type _fini,%function
|
||||
_fini:
|
||||
mov ip, sp
|
||||
stmfd sp!, {fp, ip, lr, pc}
|
||||
sub fp, ip, #4
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.2 2012/08/11 01:33:36 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.2 2012/08/11 01:33:36 matt Exp $")
|
||||
|
||||
.section ".init", "ax", %progbits
|
||||
ldmea fp, {fp, sp, pc}
|
||||
|
||||
.section ".fini", "ax", %progbits
|
||||
ldmea fp, {fp, sp, pc}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.3 2013/09/10 16:45:33 matt Exp $
|
||||
|
||||
CPPFLAGS+= -I${ARCHDIR}
|
||||
CPPFLAGS+= -DHAVE_INITFINI_ARRAY
|
||||
CPPFLAGS+= -DELF_NOTE_MARCH_DESC=\"${CSU_MACHINE_ARCH}\"
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.3 2013/09/05 00:27:38 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <arm/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.3 2013/09/05 00:27:38 matt Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
_ENTRY(__start)
|
||||
/*
|
||||
* We need to swap ps_strings and cleanup
|
||||
*/
|
||||
mov ip, r0 /* ps_strings -> tmp */
|
||||
mov r0, r2 /* cleanup -> ps_strings */
|
||||
mov r2, ip /* tmp -> ps_strings */
|
||||
|
||||
/* Ensure the stack is properly aligned before calling C code. */
|
||||
#if !defined(__thumb__)
|
||||
bic sp, sp, #7
|
||||
#else
|
||||
movs r6, #7
|
||||
mov r7, sp
|
||||
bics r7, r7, r6
|
||||
mov sp, r7
|
||||
#endif
|
||||
|
||||
/*
|
||||
* void ___start(void (*cleanup)(void),
|
||||
* const Obj_Entry *obj,
|
||||
* struct ps_strings *ps_strings);
|
||||
*/
|
||||
|
||||
b ___start
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/* $NetBSD: crtbegin.h,v 1.2 2014/05/06 16:02:10 joerg Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
static void __do_global_ctors_aux(void) __attribute__((__constructor__)) __used;
|
||||
#ifdef SHARED
|
||||
static void __do_global_dtors_aux(void) __attribute__((__destructor__)) __used;
|
||||
#endif
|
||||
|
||||
#if !defined(SHARED) && !defined(__ARM_DWARF_EH__)
|
||||
static const void *find_exidx(void *, int *) __used;
|
||||
|
||||
static const void *
|
||||
find_exidx(void * pc, int * pcount)
|
||||
{
|
||||
extern __dso_hidden const char __exidx_start[];
|
||||
extern __dso_hidden const char __exidx_end[];
|
||||
|
||||
*pcount = (__exidx_end - __exidx_start) / 8;
|
||||
return __exidx_start;
|
||||
}
|
||||
|
||||
__weak_alias(__gnu_Uwind_find_exidx,find_exidx)
|
||||
#endif /* !SHARED && !__ARM_DWARF_EH__ */
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.2 2013/12/20 15:35:48 joerg Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <arm/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.2 2013/12/20 15:35:48 joerg Exp $")
|
||||
|
||||
.eabi_attribute 18, 4 /* sizeof(wchar_t) */
|
||||
.eabi_attribute 23, 0 /* doesn't use floating point */
|
||||
.eabi_attribute 24, 1 /* 8 byte alignment permitted */
|
||||
.eabi_attribute 25, 1 /* preserves 8-byte alignment */
|
||||
.eabi_attribute 26, 2 /* enums are 32-bits */
|
||||
|
||||
.section .eh_frame, "a", %progbits
|
||||
.p2align 2
|
||||
.global __EH_FRAME_END__
|
||||
.hidden __EH_FRAME_END__
|
||||
__EH_FRAME_END__:
|
||||
.space 4
|
||||
|
||||
.section .jcr, "aw", %progbits
|
||||
.p2align 2
|
||||
.global __JCR_END__
|
||||
.hidden __JCR_END__
|
||||
__JCR_END__:
|
||||
.space 4
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2012/08/13 02:49:04 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <arm/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2012/08/13 02:49:04 matt Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
/*
|
||||
* Since ARM EABI uses .init_array/.fini_array,
|
||||
* there is no need for .init/.fini
|
||||
*/
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2012/08/13 02:49:04 matt Exp $ */
|
||||
|
||||
/* no need for anything here since ARM EABI uses .init_array/.fini_array */
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2013/07/13 18:52:35 skrll Exp $
|
||||
|
||||
CPPFLAGS+= -DELFSIZE=32 -I${ARCHDIR}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.1 2013/07/13 18:52:35 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Nick Hudson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.1 2013/07/13 18:52:35 skrll Exp $")
|
||||
|
||||
.import _GLOBAL_OFFSET_TABLE_
|
||||
.hidden ___start
|
||||
|
||||
STRONG_ALIAS(__start,_start)
|
||||
|
||||
/*
|
||||
* void _start(struct ps_strings *ps_strings,
|
||||
* void (*cleanup)(void),
|
||||
* const Obj_Entry *obj);
|
||||
*/
|
||||
_ENTRY(_start)
|
||||
.callinfo frame=0, calls
|
||||
.entry
|
||||
|
||||
bl L$lpc, %r27
|
||||
depi 0, 31, 2, %r27
|
||||
L$lpc: addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 8), %r27
|
||||
ldo R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 12)(%r1),%r27
|
||||
copy %r27, %r19
|
||||
|
||||
/*
|
||||
* void ___start(void (*cleanup)(void),
|
||||
* const Obj_Entry *obj,
|
||||
* struct ps_strings *ps_strings);
|
||||
*/
|
||||
copy %arg0, %arg3 ; ps_strings -> tmp
|
||||
copy %arg1, %arg0 ; cleanup -> arg0
|
||||
copy %arg2, %arg1 ; obj -> arg1
|
||||
b ___start
|
||||
copy %arg3, %arg2 ; ps_strings (tmp) -> arg2
|
||||
|
||||
EXIT(_start)
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
/* $NetBSD*/
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Nick Hudson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
__asm( "\n\t"
|
||||
".pushsection .init, \"ax\", @progbits" "\n\t"
|
||||
"bl __do_global_ctors_aux, %rp" "\n\t"
|
||||
" nop" "\n\t"
|
||||
".popsection");
|
||||
|
||||
__asm( "\n\t"
|
||||
".pushsection .fini, \"ax\", @progbits" "\n\t"
|
||||
"bl __do_global_dtors_aux, %rp" "\n\t"
|
||||
" nop" "\n\t"
|
||||
".popsection");
|
||||
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.1 2013/07/13 18:52:35 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 Joerg Sonnenberger <joerg@NetBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.1 2013/07/13 18:52:35 skrll Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.align 4
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
.long 0
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.align 4
|
||||
.global __DTOR_LIST_END__
|
||||
.hidden __DTOR_LIST_END__
|
||||
__DTOR_LIST_END__:
|
||||
.long 0
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.align 4
|
||||
.long 0
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.align 4
|
||||
.long 0
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2013/07/13 18:52:35 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Nick Hudson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2013/07/13 18:52:35 skrll Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
#define MD_SECTION_PROLOGUE(sect, entry_pt) \
|
||||
.section sect,"ax",@progbits ! \
|
||||
.global entry_pt ! \
|
||||
.proc ! \
|
||||
.callinfo frame=HPPA_FRAME_SIZE, calls, save_rp, save_sp, entry_gr=3 ! \
|
||||
.entry ! \
|
||||
entry_pt: ! \
|
||||
stw %rp, HPPA_FRAME_CRP(%sp) ! \
|
||||
copy %r3, %r1 ! \
|
||||
copy %sp, %r3 ! \
|
||||
stw,ma %r1, HPPA_FRAME_SIZE(%sp) ! \
|
||||
/* fall thru */ ! \
|
||||
.exit ! \
|
||||
.procend ! \
|
||||
.previous
|
||||
|
||||
MD_SECTION_PROLOGUE(.init, _init)
|
||||
MD_SECTION_PROLOGUE(.fini, _fini)
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2013/07/13 18:52:35 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Nick Hudson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.1 2013/07/13 18:52:35 skrll Exp $")
|
||||
|
||||
#define MD_SECTION_EPILOGUE(sect) \
|
||||
.section #sect,"ax",@progbits ! \
|
||||
ldw HPPA_FRAME_CRP(%r3) ,%rp ! \
|
||||
ldo HPPA_FRAME_SIZE(%r3), %sp ! \
|
||||
ldw,mb -HPPA_FRAME_SIZE(%sp), %r3 ! \
|
||||
bv,n %r0(%rp) ! \
|
||||
.previous
|
||||
|
||||
MD_SECTION_EPILOGUE(.init)
|
||||
MD_SECTION_EPILOGUE(.fini)
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2010/08/07 18:01:33 joerg Exp $
|
||||
|
||||
CPPFLAGS+= -DELFSIZE=32
|
||||
|
||||
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.3 2011/07/01 02:59:05 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Christos Zoulas
|
||||
* Copyright (c) 1995 Christopher G. Demetriou
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the
|
||||
* NetBSD Project. See http://www.NetBSD.org/ for
|
||||
* information about NetBSD.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (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: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.3 2011/07/01 02:59:05 joerg Exp $")
|
||||
|
||||
.hidden ___start
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
_ENTRY(__start)
|
||||
pushl %ebx
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
call ___start
|
||||
|
|
@ -1,174 +0,0 @@
|
|||
/* $NetBSD: crtbegin.S,v 1.1 2010/08/07 18:01:33 joerg Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2010 Joerg Sonnenberger <joerg@NetBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtbegin.S,v 1.1 2010/08/07 18:01:33 joerg Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.align 4
|
||||
__CTOR_LIST__:
|
||||
.long -1
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.align 4
|
||||
__DTOR_LIST__:
|
||||
.long -1
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.align 4
|
||||
__EH_FRAME_LIST__:
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.align 4
|
||||
__JCR_LIST__:
|
||||
|
||||
.section .data.rel, "aw", @progbits
|
||||
.align 4
|
||||
.type __dso_handle, @object
|
||||
.size __dso_handle, 4
|
||||
.globl __dso_handle
|
||||
.hidden __dso_handle
|
||||
__dso_handle:
|
||||
#ifdef SHARED
|
||||
.long __dso_handle
|
||||
#else
|
||||
.long 0
|
||||
#endif
|
||||
|
||||
__dwarf_eh_object:
|
||||
.zero 32
|
||||
|
||||
__initialized:
|
||||
.zero 1
|
||||
__finished:
|
||||
.zero 1
|
||||
|
||||
.text
|
||||
.weak __cxa_finalize
|
||||
.weak __deregister_frame_info
|
||||
.weak __register_frame_info
|
||||
.weak _Jv_RegisterClasses
|
||||
|
||||
__get_thunk:
|
||||
movl (%esp), %ebx
|
||||
ret
|
||||
|
||||
__do_global_dtors_aux:
|
||||
pushl %ebx
|
||||
pushl %edi
|
||||
subl $8, %esp
|
||||
call __get_thunk
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
||||
|
||||
cmpb $0, __finished@GOTOFF(%ebx)
|
||||
jne 4f
|
||||
movb $1, __finished@GOTOFF(%ebx)
|
||||
|
||||
#ifdef SHARED
|
||||
cmpl $0, __cxa_finalize@GOT(%ebx)
|
||||
je 1f
|
||||
movl __dso_handle@GOTOFF(%ebx), %eax
|
||||
movl %eax, (%esp)
|
||||
call __cxa_finalize@PLT
|
||||
1:
|
||||
#endif
|
||||
|
||||
leal 4+__DTOR_LIST__@GOTOFF(%ebx), %edi
|
||||
2:
|
||||
movl (%edi), %eax
|
||||
testl %eax, %eax
|
||||
je 3f
|
||||
call *%eax
|
||||
addl $8, %edi
|
||||
jmp 2b
|
||||
3:
|
||||
|
||||
cmpl $0, __deregister_frame_info@GOT(%ebx)
|
||||
je 4f
|
||||
leal __EH_FRAME_LIST__@GOTOFF(%ebx), %eax
|
||||
movl %eax, (%esp)
|
||||
call __deregister_frame_info@PLT
|
||||
4:
|
||||
addl $8, %esp
|
||||
popl %edi
|
||||
popl %ebx
|
||||
ret
|
||||
|
||||
|
||||
__do_global_ctors_aux:
|
||||
pushl %ebx
|
||||
pushl %edi
|
||||
subl $8, %esp
|
||||
call __get_thunk
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
||||
|
||||
cmpb $0, __initialized@GOTOFF(%ebx)
|
||||
jne 4f
|
||||
movb $1, __initialized@GOTOFF(%ebx)
|
||||
|
||||
cmpl $0, __register_frame_info@GOT(%ebx)
|
||||
je 1f
|
||||
leal __dwarf_eh_object@GOTOFF(%ebx), %edi
|
||||
movl %edi, 4(%esp)
|
||||
leal __EH_FRAME_LIST__@GOTOFF(%ebx), %edi
|
||||
movl %edi, (%esp)
|
||||
call __register_frame_info@PLT
|
||||
|
||||
1:
|
||||
cmpl $0, _Jv_RegisterClasses@GOT(%ebx)
|
||||
je 2f
|
||||
leal __JCR_LIST__@GOTOFF(%ebx), %edi
|
||||
movl (%edi), %edi
|
||||
testl %edi, %edi
|
||||
je 2f
|
||||
movl %edi, (%esp)
|
||||
call _Jv_RegisterClasses@PLT
|
||||
2:
|
||||
|
||||
leal -4+__CTOR_LIST_END__@GOTOFF(%ebx), %edi
|
||||
3:
|
||||
movl (%edi), %eax
|
||||
cmpl $-1, %eax
|
||||
je 4f
|
||||
call *%eax
|
||||
subl $4, %edi
|
||||
jmp 3b
|
||||
|
||||
4:
|
||||
addl $8, %esp
|
||||
popl %edi
|
||||
popl %ebx
|
||||
ret
|
||||
|
||||
.section .init, "ax", @progbits
|
||||
call __do_global_ctors_aux
|
||||
.section .fini, "ax", @progbits
|
||||
call __do_global_dtors_aux
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.1 2010/08/07 18:01:33 joerg Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2010 Joerg Sonnenberger <joerg@NetBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.1 2010/08/07 18:01:33 joerg Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.align 4
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
.long 0
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.align 4
|
||||
.long 0
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.align 4
|
||||
.long 0
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.align 4
|
||||
.long 0
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2010/08/07 18:01:33 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2010/08/07 18:01:33 joerg Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.align 16
|
||||
.globl _init
|
||||
_init:
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.align 16
|
||||
.globl _fini
|
||||
_fini:
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2010/08/07 18:01:34 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.1 2010/08/07 18:01:34 joerg Exp $")
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
leave
|
||||
ret
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
leave
|
||||
ret
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2014/03/14 18:15:02 cherry Exp $
|
||||
|
||||
CPPFLAGS+= -DELFSIZE=64 -I${ARCHDIR}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.1 2014/03/14 18:15:02 cherry Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Cherry G. Mathew of Backyard Innovations, UK, Ltd.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.1 2014/03/14 18:15:02 cherry Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
.proc __start
|
||||
.global __start
|
||||
|
||||
/*
|
||||
* Called with:
|
||||
* in0 = cleanup
|
||||
* in1 = obj
|
||||
* in2 = ps_strings
|
||||
* in3 = sp
|
||||
* See: sys/arch/ia64/ia64/machdep.c:setregs()
|
||||
*/
|
||||
|
||||
__start:
|
||||
.regstk 4, 0, 0, 0
|
||||
|
||||
mov sp = in3 /* Setup Memory Stack Pointer. */
|
||||
alloc r31 = ar.pfs, 3, 0, 0, 0 /* Adjust backingstore for ___start() */
|
||||
br.call.sptk.many rp = ___start
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
/*-
|
||||
* Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry and
|
||||
* Cherry G. Mathew of Backyard Innovations, UK, Ltd.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
__asm( "\n\t"
|
||||
".pushsection .init, \"ax\", @progbits" "\n\t"
|
||||
"br.call.sptk.many b0 = __do_global_ctors_aux" "\n\t"
|
||||
" nop 0" "\n\t"
|
||||
".popsection");
|
||||
|
||||
__asm( "\n\t"
|
||||
".pushsection .fini, \"ax\", @progbits" "\n\t"
|
||||
"br.call.sptk.many b0 = __do_global_dtors_aux" "\n\t"
|
||||
" nop 0" "\n\t"
|
||||
".popsection");
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.1 2014/03/14 18:15:02 cherry Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2010 Joerg Sonnenberger <joerg@NetBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.1 2014/03/14 18:15:02 cherry Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.align 8
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
.quad 0
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.align 8
|
||||
.global __DTOR_LIST_END__
|
||||
.hidden __DTOR_LIST_END__
|
||||
__DTOR_LIST_END__:
|
||||
.quad 0
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.align 8
|
||||
.quad 0
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.align 8
|
||||
.quad 0
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2014/03/14 18:15:02 cherry Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Cherry G. Mathew of Backyard Innovations, UK, Ltd.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2014/03/14 18:15:02 cherry Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.align 64
|
||||
.proc _init
|
||||
.global _init
|
||||
_init:
|
||||
.regstk 0, 2, 0, 0
|
||||
.prologue 12, loc0
|
||||
.save ar.pfs, loc1
|
||||
alloc loc1 = ar.pfs, 0, 2, 0, 0
|
||||
mov loc0 = b0 /* return addr */
|
||||
.endp _init
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.align 64
|
||||
.proc _fini
|
||||
.global _fini
|
||||
_fini:
|
||||
.regstk 0, 2, 0, 0
|
||||
.prologue 12, loc0
|
||||
.save ar.pfs, loc1
|
||||
alloc loc1 = ar.pfs, 0, 2, 0, 0
|
||||
mov loc0 = b0 /* return addr */
|
||||
.endp _fini
|
||||
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2014/03/14 18:15:02 cherry Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Cherry G. Mathew of Backyard Innovations, UK, Ltd.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.1 2014/03/14 18:15:02 cherry Exp $")
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.regstk 0, 2, 0, 0
|
||||
mov b0 = loc0
|
||||
mov ar.pfs = loc1
|
||||
br.ret.sptk.many b0
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.regstk 0, 2, 0, 0
|
||||
mov b0 = loc0
|
||||
mov ar.pfs = loc1
|
||||
br.ret.sptk.many b0
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.2 2013/07/11 17:07:35 matt Exp $
|
||||
|
||||
CPPFLAGS+= -I${ARCHDIR} -DELFSIZE=32
|
||||
|
||||
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Klaus Klein
|
||||
* Copyright (c) 1995 Christopher G. Demetriou
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the
|
||||
* NetBSD Project. See http://www.NetBSD.org/ for
|
||||
* information about NetBSD.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (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: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
*/
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.4 2013/07/26 19:49:19 matt Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
_ENTRY(__start)
|
||||
movl %a2,-(%sp) | ps_strings
|
||||
movl %a0,-(%sp) | obj
|
||||
movl %a1,-(%sp) | cleanup
|
||||
| call: ___start(cleanup, obj, ps_strings)
|
||||
jbsr ___start
|
||||
END(__start)
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
/* $NetBSD: crtbegin.h,v 1.4 2013/07/27 13:07:06 martin Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
__asm( ".pushsection .init"
|
||||
#ifdef __pic__
|
||||
"\n\t" "bsrl __do_global_ctors_aux"
|
||||
#else
|
||||
"\n\t" "jsr __do_global_ctors_aux"
|
||||
#endif
|
||||
"\n\t" ".popsection");
|
||||
|
||||
__asm( ".pushsection .fini"
|
||||
#ifdef __pic__
|
||||
"\n\t" "bsrl __do_global_dtors_aux"
|
||||
#else
|
||||
"\n\t" "jsr __do_global_dtors_aux"
|
||||
#endif
|
||||
"\n\t" ".popsection");
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.1 2013/07/11 17:07:35 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <m68k/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.1 2013/07/11 17:07:35 matt Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.p2align 2
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
.long 0
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.p2align 2
|
||||
.global __DTOR_LIST_END__
|
||||
.hidden __DTOR_LIST_END__
|
||||
__DTOR_LIST_END__:
|
||||
.long 0
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.p2align 2
|
||||
.long 0
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.p2align 2
|
||||
.long 0
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2010/08/07 18:01:34 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2010/08/07 18:01:34 joerg Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.align 2
|
||||
.globl _init
|
||||
_init:
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.align 2
|
||||
.globl _fini
|
||||
_fini:
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2010/08/07 18:01:34 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.1 2010/08/07 18:01:34 joerg Exp $")
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
rts
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
rts
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.2 2013/07/10 15:05:46 matt Exp $
|
||||
|
||||
CPPFLAGS+= -I${ARCHDIR} -DELFSIZE=_MIPS_SZPTR
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.3 2013/12/08 06:32:36 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <mips/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.3 2013/12/08 06:32:36 matt Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
/*
|
||||
* Assumes kernel (or ld_elf.so) passes the following parameters to
|
||||
* user-space in registers:
|
||||
*
|
||||
* a0 stack pointer (0 if setregs didn't fill this in)
|
||||
* a1 cleanup
|
||||
* a2 Obj_Entry
|
||||
* a3 ps_strings
|
||||
*
|
||||
* XXX Does this violate the ABI?
|
||||
* as well as the usual registers (pc, sp, and t9 == pc for ABI).
|
||||
*/
|
||||
|
||||
NESTED_NOPROFILE(__start, CALLFRAME_SIZ, ra)
|
||||
SETUP_GP
|
||||
SETUP_GP64(t3, __start)
|
||||
move a0, a1 /* cleanup */
|
||||
move a1, a2 /* Obj_Entry */
|
||||
PTR_L t9,%call16(_C_LABEL(___start))(gp)
|
||||
move a2, a3 /* ps_strings */
|
||||
.reloc 1f,R_MIPS_JALR,___start
|
||||
1: jr t9
|
||||
END(__start)
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
__asm( "\n\t"
|
||||
".pushsection .init, \"ax\", @progbits" "\n\t"
|
||||
#ifdef __mips_o32
|
||||
".set noreorder" "\n\t"
|
||||
".set nomacro" "\n\t"
|
||||
"move $28,$16" "\n\t"
|
||||
"lw $25,%got(__do_global_ctors_aux)($28)" "\n\t"
|
||||
"nop" "\n\t"
|
||||
"addiu $25,$25,%lo(__do_global_ctors_aux)" "\n\t"
|
||||
".reloc 1f,R_MIPS_JALR,__do_global_ctors_aux" "\n\t"
|
||||
"1: jalr $25" "\n\t"
|
||||
"nop" "\n\t"
|
||||
".set macro" "\n\t"
|
||||
".set reorder" "\n\t"
|
||||
#else
|
||||
"jal __do_global_ctors_aux" "\n\t"
|
||||
#endif
|
||||
".popsection");
|
||||
|
||||
__asm( "\n\t"
|
||||
".pushsection .fini, \"ax\", @progbits" "\n\t"
|
||||
#ifdef __mips_o32
|
||||
".set noreorder" "\n\t"
|
||||
".set nomacro" "\n\t"
|
||||
"move $28,$16" "\n\t"
|
||||
"lw $25,%got(__do_global_dtors_aux)($28)" "\n\t"
|
||||
"nop" "\n\t"
|
||||
"addiu $25,$25,%lo(__do_global_dtors_aux)" "\n\t"
|
||||
".reloc 1f,R_MIPS_JALR,__do_global_dtors_aux" "\n\t"
|
||||
"1: jalr $25" "\n\t"
|
||||
"nop" "\n\t"
|
||||
".set macro" "\n\t"
|
||||
".set reorder" "\n\t"
|
||||
#else
|
||||
"jal __do_global_dtors_aux" "\n\t"
|
||||
#endif
|
||||
".popsection");
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.3 2013/09/05 00:28:11 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <mips/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.3 2013/09/05 00:28:11 matt Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.p2align PTR_SCALESHIFT
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
.word 0
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.p2align PTR_SCALESHIFT
|
||||
.global __DTOR_LIST_END__
|
||||
.hidden __DTOR_LIST_END__
|
||||
__DTOR_LIST_END__:
|
||||
.word 0
|
||||
|
||||
.section .eh_frame, "aw", @progbits
|
||||
.p2align PTR_SCALESHIFT
|
||||
.space _MIPS_SZPTR / 8
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.p2align PTR_SCALESHIFT
|
||||
.space _MIPS_SZPTR / 8
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.3 2015/05/01 21:35:56 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <mips/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.3 2015/05/01 21:35:56 matt Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.p2align 2
|
||||
NESTED_NOPROFILE(_init, CALLFRAME_SIZ, ra)
|
||||
SETUP_GP
|
||||
PTR_SUBU sp, sp, CALLFRAME_SIZ # allocate stack frame
|
||||
REG_S ra, CALLFRAME_RA(sp) # save RA
|
||||
#ifdef __mips_o32
|
||||
REG_S s0, CALLFRAME_S0(sp) # save s0
|
||||
move s0, gp
|
||||
#endif
|
||||
SETUP_GP64(CALLFRAME_GP, _init)
|
||||
END(_init)
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.p2align 2
|
||||
NESTED_NOPROFILE(_fini, CALLFRAME_SIZ, ra)
|
||||
SETUP_GP
|
||||
PTR_SUBU sp, sp, CALLFRAME_SIZ # allocate stack frame
|
||||
REG_S ra, CALLFRAME_RA(sp) # save RA
|
||||
#ifdef __mips_o32
|
||||
REG_S s0, CALLFRAME_S0(sp) # save s0
|
||||
move s0, gp
|
||||
#endif
|
||||
SETUP_GP64(CALLFRAME_GP, _fini)
|
||||
END(_fini)
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <mips/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.2 2013/06/30 08:00:34 matt Exp $")
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
REG_L ra, CALLFRAME_RA(sp)
|
||||
#if defined(__mips_o32) || defined(__mips_o64)
|
||||
REG_L s0, CALLFRAME_S0(sp)
|
||||
#else
|
||||
REG_L gp, CALLFRAME_GP(sp)
|
||||
#endif
|
||||
PTR_ADDU sp, sp, CALLFRAME_SIZ
|
||||
jr ra
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
REG_L ra, CALLFRAME_RA(sp)
|
||||
#ifdef __mips_o32
|
||||
REG_L s0, CALLFRAME_S0(sp)
|
||||
#else
|
||||
REG_L gp, CALLFRAME_GP(sp)
|
||||
#endif
|
||||
PTR_ADDU sp, sp, CALLFRAME_SIZ
|
||||
jr ra
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2014/09/03 19:34:25 matt Exp $
|
||||
|
||||
CPPFLAGS+= -I${ARCHDIR}
|
||||
CPPFLAGS+= -DHAVE_INITFINI_ARRAY
|
||||
#CPPFLAGS+= -DELF_NOTE_MARCH_DESC=\"${CSU_MACHINE_ARCH}\"
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.1 2014/09/03 19:34:25 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <or1k/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.1 2014/09/03 19:34:25 matt Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
_ENTRY(__start)
|
||||
/*
|
||||
* void ___start(void (*cleanup)(void), const Obj_Entry *obj,
|
||||
* struct ps_strings *ps_strings);
|
||||
*/
|
||||
l.jal ___start
|
||||
END(__start)
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
/* $NetBSD: crtbegin.h,v 1.1 2014/09/03 19:34:25 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
static void __do_global_ctors_aux(void) __attribute__((__constructor__)) __used;
|
||||
#ifdef SHARED
|
||||
static void __do_global_dtors_aux(void) __attribute__((__destructor__)) __used;
|
||||
#endif
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.1 2014/09/03 19:34:25 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.1 2014/09/03 19:34:25 matt Exp $")
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.p2align 2
|
||||
.global __EH_FRAME_END__
|
||||
.hidden __EH_FRAME_END__
|
||||
__EH_FRAME_END__:
|
||||
.space 4
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.p2align 2
|
||||
.global __JCR_END__
|
||||
.hidden __JCR_END__
|
||||
__JCR_END__:
|
||||
.space 4
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2014/09/03 19:34:25 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2014/09/03 19:34:25 matt Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
/*
|
||||
* Since OR1K for NetBSD uses .init_array/.fini_array,
|
||||
* there is no need for .init/.fini
|
||||
*/
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2014/09/03 19:34:25 matt Exp $ */
|
||||
|
||||
/* no need for anything here since OR1K for NetBSD uses .init_array/.fini_array */
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.2 2013/06/27 21:24:39 matt Exp $
|
||||
|
||||
CPPFLAGS+= -I${ARCHDIR}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <powerpc/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.6 2014/02/27 18:01:51 matt Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
.hidden ___start
|
||||
|
||||
#ifndef _LP64
|
||||
.weak _SDA_BASE_
|
||||
#endif
|
||||
|
||||
ENTRY_NOPROFILE(__start)
|
||||
#ifndef _LP64
|
||||
bcl 20,31,1f
|
||||
1:
|
||||
mflr %r11
|
||||
/* SVR4 ABI says small data is in r13 */
|
||||
addis %r13,%r11,_SDA_BASE_-1b@ha
|
||||
addi %r13,%r13,_SDA_BASE_-1b@l
|
||||
#endif
|
||||
|
||||
mr %r3,%r7 /* cleanup */
|
||||
mr %r4,%r6 /* obj */
|
||||
mr %r5,%r8 /* ps_strings */
|
||||
|
||||
CALL(___start)
|
||||
END(__start)
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
/* $NetBSD: crtbegin.h,v 1.1 2013/06/27 21:24:39 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
__asm( ".pushsection .init, \"ax\", @progbits"
|
||||
"\n\t" "bl __do_global_ctors_aux"
|
||||
"\n\t" ".popsection");
|
||||
|
||||
__asm( ".pushsection .fini, \"ax\", @progbits"
|
||||
"\n\t" "bl __do_global_dtors_aux"
|
||||
"\n\t" ".popsection");
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.3 2014/02/27 16:47:48 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <powerpc/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.3 2014/02/27 16:47:48 matt Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.p2align P2SZREG
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
#ifdef _LP64
|
||||
.quad 0
|
||||
#else
|
||||
.long 0
|
||||
#endif
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.p2align P2SZREG
|
||||
.global __DTOR_LIST_END__
|
||||
.hidden __DTOR_LIST_END__
|
||||
__DTOR_LIST_END__:
|
||||
#ifdef _LP64
|
||||
.quad 0
|
||||
#else
|
||||
.long 0
|
||||
#endif
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.p2align P2SZREG
|
||||
#ifdef _LP64
|
||||
.quad 0
|
||||
#else
|
||||
.long 0
|
||||
#endif
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.p2align P2SZREG
|
||||
#ifdef _LP64
|
||||
.quad 0
|
||||
#else
|
||||
.long 0
|
||||
#endif
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.4 2014/03/06 19:05:59 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <powerpc/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.4 2014/03/06 19:05:59 matt Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
_XENTRY(_init)
|
||||
mflr %r0
|
||||
#ifdef _LP64
|
||||
stdu %r1, -(6*SZREG)(%r1)
|
||||
std %r0, (2*SZREG)(%r1)
|
||||
#else
|
||||
stw %r0, (1*SZREG)(%r1)
|
||||
stwu %r1, -(4*SZREG)(%r1)
|
||||
#endif
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
_XENTRY(_fini)
|
||||
mflr %r0
|
||||
#ifdef _LP64
|
||||
stdu %r1, -(6*SZREG)(%r1)
|
||||
std %r0, (2*SZREG)(%r1)
|
||||
#else
|
||||
stw %r0, (1*SZREG)(%r1)
|
||||
stwu %r1, -(4*SZREG)(%r1)
|
||||
#endif
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <powerpc/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.2 2014/02/27 16:47:48 matt Exp $")
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
#ifdef _LP64
|
||||
ldreg %r0, (2*SZREG)(%r1)
|
||||
addi %r1, %r1, (6*SZREG)
|
||||
#else
|
||||
addi %r1, %r1, (4*SZREG)
|
||||
lwz %r0, (1*SZREG)(%r1)
|
||||
#endif
|
||||
mtlr %r0
|
||||
blr
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
#ifdef _LP64
|
||||
ldreg %r0, (2*SZREG)(%r1)
|
||||
addi %r1, %r1, (6*SZREG)
|
||||
#else
|
||||
addi %r1, %r1, (4*SZREG)
|
||||
lwz %r0, (1*SZREG)(%r1)
|
||||
#endif
|
||||
mtlr %r0
|
||||
blr
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2014/09/19 17:36:25 matt Exp $
|
||||
|
||||
CPPFLAGS+= -I${ARCHDIR}
|
||||
CPPFLAGS+= -DHAVE_INITFINI_ARRAY
|
||||
#CPPFLAGS+= -DELF_NOTE_MARCH_DESC=\"${CSU_MACHINE_ARCH}\"
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.1 2014/09/19 17:36:25 matt Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
_ENTRY(__start)
|
||||
/*
|
||||
* void ___start(void (*cleanup)(void), const Obj_Entry *obj,
|
||||
* struct ps_strings *ps_strings);
|
||||
*/
|
||||
j ___start
|
||||
END(__start)
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
/* $NetBSD: crtbegin.h,v 1.1 2014/09/19 17:36:25 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
static void __do_global_ctors_aux(void) __attribute__((__constructor__)) __used;
|
||||
#ifdef SHARED
|
||||
static void __do_global_dtors_aux(void) __attribute__((__destructor__)) __used;
|
||||
#endif
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.1 2014/09/19 17:36:25 matt Exp $")
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.p2align PTR_SCALESHIFT
|
||||
.global __EH_FRAME_END__
|
||||
.hidden __EH_FRAME_END__
|
||||
__EH_FRAME_END__:
|
||||
.space (1 << PTR_SCALESHIFT)
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.p2align PTR_SCALESHIFT
|
||||
.global __JCR_END__
|
||||
.hidden __JCR_END__
|
||||
__JCR_END__:
|
||||
.space (1 << PTR_SCALESHIFT)
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2014/09/19 17:36:25 matt Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
/*
|
||||
* Since OR1K for NetBSD uses .init_array/.fini_array,
|
||||
* there is no need for .init/.fini
|
||||
*/
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */
|
||||
|
||||
/* no need for anything here since OR1K for NetBSD uses .init_array/.fini_array */
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2010/08/07 18:01:34 joerg Exp $
|
||||
|
||||
CPPFLAGS+= -DELFSIZE=32
|
||||
|
||||
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.4 2012/01/31 20:17:57 uwe Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Christos Zoulas
|
||||
* Copyright (c) 1995 Christopher G. Demetriou
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the
|
||||
* NetBSD Project. See http://www.NetBSD.org/ for
|
||||
* information about NetBSD.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (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: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.4 2012/01/31 20:17:57 uwe Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
/*
|
||||
* Kernel setregs() passes arguments for the 6-argument version of
|
||||
* ___start (but with 5th and 6th in registers, to avoid copyout).
|
||||
* Since we now use 3-argument version of ___start - that obtains
|
||||
* argc, argv and environ from ps_strings - move its arguments to
|
||||
* proper registers.
|
||||
*/
|
||||
_ENTRY(__start)
|
||||
mov.l .L___start, r0
|
||||
mov r7, r4 ! void (*cleanup)(void)
|
||||
mov r8, r5 ! const Obj_Entry *obj
|
||||
jmp @r0
|
||||
mov r9, r6 ! struct ps_strings *ps_strings
|
||||
|
||||
.p2align 2
|
||||
.L___start: .long _C_LABEL(___start)
|
||||
|
|
@ -1,366 +0,0 @@
|
|||
/* $NetBSD: crtbegin.S,v 1.3 2013/09/12 15:36:14 joerg Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2012 Valeriy E. Ushakov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtbegin.S,v 1.3 2013/09/12 15:36:14 joerg Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.p2align 2
|
||||
__CTOR_LIST__:
|
||||
.long -1
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.p2align 2
|
||||
__DTOR_LIST__:
|
||||
.long -1
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.p2align 2
|
||||
__EH_FRAME_LIST__:
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.p2align 2
|
||||
__JCR_LIST__:
|
||||
|
||||
.section .data.rel, "aw", @progbits
|
||||
.p2align 2
|
||||
.globl __dso_handle
|
||||
.hidden __dso_handle
|
||||
.type __dso_handle, @object
|
||||
.size __dso_handle, 4
|
||||
__dso_handle:
|
||||
#ifdef SHARED
|
||||
.long __dso_handle
|
||||
#else
|
||||
.long 0
|
||||
#endif
|
||||
|
||||
__dwarf_eh_object:
|
||||
.zero 32
|
||||
|
||||
__initialized:
|
||||
.zero 1
|
||||
__finished:
|
||||
.zero 1
|
||||
|
||||
.text
|
||||
.weak __cxa_finalize
|
||||
.weak __deregister_frame_info
|
||||
.weak __register_frame_info
|
||||
.weak _Jv_RegisterClasses
|
||||
|
||||
/*
|
||||
* A bit of CPP syntactic sugar for accessing variables.
|
||||
*
|
||||
* For PIC we are obliged to use @(r0, r12) since r12 has the GOT
|
||||
* address and only r0 can be used in @(r0, Rm) addressing mode, so we
|
||||
* always load variable address to r0.
|
||||
*/
|
||||
#ifdef __PIC__
|
||||
#define VAR_DATUM(var) var@GOTOFF
|
||||
#define FUNC_DATUM(f) f@GOT
|
||||
#define R0VAR (r0, r12)
|
||||
#else
|
||||
#define VAR_DATUM(var) var
|
||||
#define FUNC_DATUM(f) f
|
||||
#define R0VAR r0
|
||||
#endif
|
||||
|
||||
|
||||
__do_global_ctors_aux:
|
||||
mov.l r8, @-sp
|
||||
mov.l r9, @-sp
|
||||
#ifdef __PIC__
|
||||
mov.l r12, @-sp
|
||||
mov.l .Lc_got, r12
|
||||
mova .Lc_got, r0
|
||||
add r0, r12
|
||||
#endif
|
||||
mov.l r14, @-sp
|
||||
sts.l pr, @-sp
|
||||
mov sp, r14
|
||||
|
||||
!! if (__initialized) return;
|
||||
mov.l .Lc___initialized, r0
|
||||
mov.b @R0VAR, r1
|
||||
tst r1, r1
|
||||
bf .Lc_return
|
||||
|
||||
!! __initialized = 1;
|
||||
mov #1, r1
|
||||
mov.b r1, @R0VAR
|
||||
|
||||
|
||||
!! if (__register_frame_info)
|
||||
!! __register_frame_info(&__EH_FRAME_LIST__[0], &__dwarf_eh_object)
|
||||
#ifdef __PIC__
|
||||
mov.l .Lc___register_frame_info_GOT, r0
|
||||
mov.l @R0VAR, r1
|
||||
tst r1, r1
|
||||
bt .Lc___register_frame_info_done
|
||||
mov.l .Lc___register_frame_info, r0
|
||||
mov.l .Lc___EH_FRAME_LIST__, r4
|
||||
mov.l .Lc___dwarf_eh_object, r5
|
||||
add r12, r4
|
||||
.Lc___register_frame_info_call:
|
||||
CALL r0
|
||||
add r12, r5
|
||||
#else /* !PIC */
|
||||
mov.l .Lc___register_frame_info, r0
|
||||
tst r0, r0
|
||||
bt .Lc___register_frame_info_done
|
||||
mov.l .Lc___EH_FRAME_LIST__, r4
|
||||
mov.l .Lc___dwarf_eh_object, r5
|
||||
CALL r0
|
||||
nop
|
||||
#endif
|
||||
.Lc___register_frame_info_done:
|
||||
|
||||
!! if (_Jv_RegisterClasses && __JCR_LIST__[0])
|
||||
!! _Jv_RegisterClasses(&__JCR_LIST__[0]);
|
||||
#ifdef __PIC__
|
||||
mov.l .Lc__Jv_RegisterClasses_GOT, r0
|
||||
mov.l @R0VAR, r1
|
||||
tst r1, r1
|
||||
bt .Lc__Jv_RegisterClasses_done
|
||||
|
||||
mov.l .Lc___JCR_LIST__, r0
|
||||
mov.l @R0VAR, r1
|
||||
tst r1, r1
|
||||
bt .Lc__Jv_RegisterClasses_done
|
||||
|
||||
mov.l .Lc__Jv_RegisterClasses, r2
|
||||
mov r0, r4
|
||||
.Lc__Jv_RegisterClasses_call:
|
||||
CALL r2
|
||||
add r12, r4
|
||||
|
||||
#else /* !PIC */
|
||||
mov.l .Lc__Jv_RegisterClasses, r2
|
||||
tst r2, r2
|
||||
bt .Lc__Jv_RegisterClasses_done
|
||||
|
||||
mov.l .Lc___JCR_LIST__, r0
|
||||
mov.l @R0VAR, r1
|
||||
tst r1, r1
|
||||
bt .Lc__Jv_RegisterClasses_done
|
||||
|
||||
mov r0, r4
|
||||
.Lc__Jv_RegisterClasses_call:
|
||||
CALL r2
|
||||
add r12, r4
|
||||
#endif
|
||||
.Lc__Jv_RegisterClasses_done:
|
||||
|
||||
|
||||
!! call all constructors on __CTOR_LIST__ in reverse order
|
||||
mov.l .Lc___CTOR_LIST_END__, r8
|
||||
#ifdef __PIC__
|
||||
add r12, r8
|
||||
#endif
|
||||
add #-4, r8
|
||||
mov.l @r8, r9
|
||||
not r9, r0 ! sentinel at __CTOR_LIST__[0] is -1
|
||||
.Lc_ctor_list_loop:
|
||||
tst r0, r0
|
||||
bt.s .Lc_ctor_list_done
|
||||
add #-4, r8
|
||||
jsr @r9
|
||||
mov.l @r8, r9
|
||||
bra .Lc_ctor_list_loop
|
||||
not r9, r0
|
||||
.Lc_ctor_list_done:
|
||||
|
||||
.Lc_return:
|
||||
mov r14, sp
|
||||
lds.l @sp+, pr
|
||||
mov.l @sp+, r14
|
||||
#ifdef __PIC__
|
||||
mov.l @sp+, r12
|
||||
#endif
|
||||
mov.l @sp+, r9
|
||||
rts
|
||||
mov.l @sp+, r8
|
||||
|
||||
.p2align 2
|
||||
.Lc_got:
|
||||
PIC_GOT_DATUM
|
||||
.Lc___initialized:
|
||||
.long VAR_DATUM(__initialized)
|
||||
#ifdef __PIC__
|
||||
.Lc___register_frame_info_GOT:
|
||||
.long __register_frame_info@GOT
|
||||
#endif
|
||||
.Lc___register_frame_info:
|
||||
CALL_DATUM(__register_frame_info, .Lc___register_frame_info_call)
|
||||
.Lc___EH_FRAME_LIST__:
|
||||
.long VAR_DATUM(__EH_FRAME_LIST__)
|
||||
.Lc___dwarf_eh_object:
|
||||
.long VAR_DATUM(__dwarf_eh_object)
|
||||
#ifdef __PIC__
|
||||
.Lc__Jv_RegisterClasses_GOT:
|
||||
.long _Jv_RegisterClasses@GOT
|
||||
#endif
|
||||
.Lc__Jv_RegisterClasses:
|
||||
CALL_DATUM(_Jv_RegisterClasses, .Lc__Jv_RegisterClasses_call)
|
||||
.Lc___JCR_LIST__:
|
||||
.long VAR_DATUM(__JCR_LIST__)
|
||||
.Lc___CTOR_LIST_END__:
|
||||
.long VAR_DATUM(__CTOR_LIST_END__)
|
||||
|
||||
|
||||
__do_global_dtors_aux:
|
||||
mov.l r8, @-sp
|
||||
mov.l r9, @-sp
|
||||
#ifdef __PIC__
|
||||
mov.l r12, @-sp
|
||||
mov.l .Ld_got, r12
|
||||
mova .Ld_got, r0
|
||||
add r0, r12
|
||||
#endif
|
||||
mov.l r14, @-sp
|
||||
sts.l pr, @-sp
|
||||
mov sp, r14
|
||||
|
||||
!! if (__finished) return;
|
||||
mov.l .Ld___finished, r0
|
||||
mov.b @R0VAR, r1
|
||||
tst r1, r1
|
||||
bf .Ld_return
|
||||
|
||||
!! __finished = 1;
|
||||
mov #1, r1
|
||||
mov.b r1, @R0VAR
|
||||
|
||||
#ifdef SHARED /* implies PIC */
|
||||
!! if (__cxa_finalize)
|
||||
!! __cxa_finalize(&__dso_handle);
|
||||
mov.l .Ld___cxa_finalize_GOT, r0
|
||||
mov.l @R0VAR, r1
|
||||
tst r1, r1
|
||||
bt .Ld___cxa_finalize_done
|
||||
mov.l .Ld___cxa_finalize, r0
|
||||
mov.l .Ld___dso_handle, r4
|
||||
.Ld___cxa_finalize_call:
|
||||
CALL r0
|
||||
add r12, r4
|
||||
.Ld___cxa_finalize_done:
|
||||
#endif /* SHARED */
|
||||
|
||||
!! call all destructors on __DTOR_LIST__
|
||||
mov.l .Ld___DTOR_LIST__, r8
|
||||
#ifdef __PIC__
|
||||
add r12, r8
|
||||
#endif
|
||||
add #4, r8 ! skip first entry that we know to be -1
|
||||
mov.l @r8+, r9
|
||||
tst r9, r9
|
||||
.Ld_dtor_list_loop:
|
||||
bt .Ld_dtor_list_done
|
||||
jsr @r9
|
||||
mov.l @r8+, r9
|
||||
bra .Ld_dtor_list_loop
|
||||
tst r9, r9
|
||||
.Ld_dtor_list_done:
|
||||
|
||||
!! if (__deregister_frame_info)
|
||||
!! __deregister_frame_info(&__EH_FRAME_LIST__[0]);
|
||||
#ifdef __PIC__
|
||||
mov.l .Ld___deregister_frame_info_GOT, r0
|
||||
mov.l @R0VAR, r1
|
||||
tst r1, r1
|
||||
bt .Ld___deregister_frame_info_done
|
||||
mov.l .Ld___deregister_frame_info, r0
|
||||
mov.l .Ld___EH_FRAME_LIST__, r4
|
||||
.Ld___deregister_frame_info_call:
|
||||
CALL r0
|
||||
add r12, r4
|
||||
#else /* !PIC */
|
||||
mov.l .Ld___deregister_frame_info, r0
|
||||
tst r0, r0
|
||||
bt .Ld___deregister_frame_info_done
|
||||
mov.l .Ld___EH_FRAME_LIST__, r4
|
||||
CALL r0
|
||||
nop
|
||||
#endif
|
||||
.Ld___deregister_frame_info_done:
|
||||
|
||||
.Ld_return:
|
||||
mov r14, sp
|
||||
lds.l @sp+, pr
|
||||
mov.l @sp+, r14
|
||||
#ifdef __PIC__
|
||||
mov.l @sp+, r12
|
||||
#endif
|
||||
mov.l @sp+, r9
|
||||
rts
|
||||
mov.l @sp+, r8
|
||||
|
||||
.p2align 2
|
||||
.Ld_got:
|
||||
PIC_GOT_DATUM
|
||||
.Ld___finished:
|
||||
.long VAR_DATUM(__finished)
|
||||
#ifdef SHARED /* implies PIC */
|
||||
.Ld___cxa_finalize_GOT:
|
||||
.long __cxa_finalize@GOT
|
||||
.Ld___cxa_finalize:
|
||||
CALL_DATUM(__cxa_finalize, .Ld___cxa_finalize_call)
|
||||
.Ld___dso_handle:
|
||||
.long VAR_DATUM(__dso_handle)
|
||||
#endif
|
||||
.Ld___DTOR_LIST__:
|
||||
.long VAR_DATUM(__DTOR_LIST__)
|
||||
#ifdef __PIC__
|
||||
.Ld___deregister_frame_info_GOT:
|
||||
.long __deregister_frame_info@GOT
|
||||
#endif
|
||||
.Ld___deregister_frame_info:
|
||||
CALL_DATUM(__deregister_frame_info, .Ld___deregister_frame_info_call)
|
||||
.Ld___EH_FRAME_LIST__:
|
||||
.long VAR_DATUM(__EH_FRAME_LIST__)
|
||||
|
||||
|
||||
|
||||
#define _CALL_INIT_FINI_FUNCTION(func) \
|
||||
mov.l 1f, r1; \
|
||||
mova 2f, r0; \
|
||||
0: braf r1; /* NB: branch, not call ... */ \
|
||||
lds r0, pr; /* skip the following .long when returning */ \
|
||||
.p2align 2; \
|
||||
1: .long func - (0b+4); \
|
||||
2: ;
|
||||
|
||||
.section .init, "ax", @progbits
|
||||
_CALL_INIT_FINI_FUNCTION(__do_global_ctors_aux)
|
||||
|
||||
.section .fini, "ax", @progbits
|
||||
_CALL_INIT_FINI_FUNCTION(__do_global_dtors_aux)
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.2 2012/01/31 20:12:47 uwe Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2010 Joerg Sonnenberger <joerg@NetBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.2 2012/01/31 20:12:47 uwe Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.p2align 2
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
.long 0
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.p2align 2
|
||||
.long 0
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.p2align 2
|
||||
.long 0
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.p2align 2
|
||||
.long 0
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.3 2012/01/31 20:12:47 uwe Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.3 2012/01/31 20:12:47 uwe Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
|
||||
/*
|
||||
* Provide function prologues for the code in .init and .fini sections.
|
||||
* Corresponding epilogues are in crtn.S
|
||||
*/
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.p2align 2
|
||||
.globl _init
|
||||
_init:
|
||||
mov.l r14, @-sp
|
||||
sts.l pr, @-sp
|
||||
mov sp, r14
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.p2align 2
|
||||
.globl _fini
|
||||
_fini:
|
||||
mov.l r14, @-sp
|
||||
sts.l pr, @-sp
|
||||
mov sp, r14
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.2 2012/01/28 12:45:43 uwe Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.2 2012/01/28 12:45:43 uwe Exp $")
|
||||
|
||||
|
||||
/*
|
||||
* Provide function epilogues for the code in .init and .fini sections.
|
||||
* Corresponding prologues are in crti.S
|
||||
*/
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
mov r14, sp
|
||||
lds.l @sp+, pr
|
||||
rts
|
||||
mov.l @sp+, r14
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
mov r14, sp
|
||||
lds.l @sp+, pr
|
||||
rts
|
||||
mov.l @sp+, r14
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.2 2013/07/11 06:57:15 martin Exp $
|
||||
|
||||
CPPFLAGS+= -DELFSIZE=32 -I${ARCHDIR}
|
||||
|
||||
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.2 2013/07/11 06:57:15 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Christos Zoulas
|
||||
* Copyright (c) 1995 Christopher G. Demetriou
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the
|
||||
* NetBSD Project. See http://www.NetBSD.org/ for
|
||||
* information about NetBSD.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (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: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.2 2013/07/11 06:57:15 martin Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
! called with:
|
||||
! %g3 = cleanup
|
||||
! %g2 = obj
|
||||
! %g1 = ps_strings
|
||||
! call: ___start(cleanup, obj, ps_strings)
|
||||
_ENTRY(__start)
|
||||
mov 0, %fp
|
||||
andn %sp, 7, %sp ! align stack
|
||||
sub %sp, 24, %sp ! expand to standard stack frame size
|
||||
mov %g3, %o0
|
||||
mov %g2, %o1
|
||||
call ___start
|
||||
mov %g1, %o2
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
__asm( "\n\t"
|
||||
".pushsection .init, \"ax\", @progbits" "\n\t"
|
||||
"call __do_global_ctors_aux" "\n\t"
|
||||
" nop" "\n\t"
|
||||
".popsection");
|
||||
|
||||
__asm( "\n\t"
|
||||
".pushsection .fini, \"ax\", @progbits" "\n\t"
|
||||
"call __do_global_dtors_aux" "\n\t"
|
||||
" nop" "\n\t"
|
||||
".popsection");
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.1 2013/07/11 06:57:15 martin Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2010 Joerg Sonnenberger <joerg@NetBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.1 2013/07/11 06:57:15 martin Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.align 4
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
.long 0
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.align 4
|
||||
.global __DTOR_LIST_END__
|
||||
.hidden __DTOR_LIST_END__
|
||||
__DTOR_LIST_END__:
|
||||
.long 0
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.align 4
|
||||
.long 0
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.align 4
|
||||
.long 0
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2010/08/07 18:01:34 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Matthew R. Green
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2010/08/07 18:01:34 joerg Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.align 4
|
||||
.globl _init
|
||||
_init:
|
||||
save %sp, -96, %sp
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.align 4
|
||||
.globl _fini
|
||||
_fini:
|
||||
save %sp, -96, %sp
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2010/08/07 18:01:34 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Matthew R. Green
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.1 2010/08/07 18:01:34 joerg Exp $")
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.align 4
|
||||
ret
|
||||
restore
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.align 4
|
||||
ret
|
||||
restore
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2013/07/11 06:57:15 martin Exp $
|
||||
|
||||
CPPFLAGS+= -DELFSIZE=64 -I${ARCHDIR}
|
||||
|
||||
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.1 2013/07/11 06:57:15 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Christos Zoulas
|
||||
* Copyright (c) 1995 Christopher G. Demetriou
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the
|
||||
* NetBSD Project. See http://www.NetBSD.org/ for
|
||||
* information about NetBSD.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (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: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.1 2013/07/11 06:57:15 martin Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
.align 4
|
||||
.register %g3,#scratch
|
||||
.register %g2,#scratch
|
||||
|
||||
! called with:
|
||||
! %g3 = cleanup
|
||||
! %g2 = obj
|
||||
! %g1 = ps_strings
|
||||
! call: ___start(cleanup, obj, ps_strings)
|
||||
_ENTRY(__start)
|
||||
clr %fp
|
||||
clr %g4 ! data base for some memory models
|
||||
mov %g3, %o0
|
||||
mov %g2, %o1
|
||||
ba,pt %icc,___start
|
||||
mov %g1, %o2
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
__asm( "\n\t"
|
||||
".pushsection .init, \"ax\", @progbits" "\n\t"
|
||||
"call __do_global_ctors_aux" "\n\t"
|
||||
" nop" "\n\t"
|
||||
".popsection");
|
||||
|
||||
__asm( "\n\t"
|
||||
".pushsection .fini, \"ax\", @progbits" "\n\t"
|
||||
"call __do_global_dtors_aux" "\n\t"
|
||||
" nop" "\n\t"
|
||||
".popsection");
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* $NetBSD: crtend.S,v 1.1 2013/07/11 06:57:15 martin Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2010 Joerg Sonnenberger <joerg@NetBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtend.S,v 1.1 2013/07/11 06:57:15 martin Exp $")
|
||||
|
||||
.section .ctors, "aw", @progbits
|
||||
.align 8
|
||||
.global __CTOR_LIST_END__
|
||||
.hidden __CTOR_LIST_END__
|
||||
__CTOR_LIST_END__:
|
||||
.quad 0
|
||||
|
||||
.section .dtors, "aw", @progbits
|
||||
.align 8
|
||||
.global __DTOR_LIST_END__
|
||||
.hidden __DTOR_LIST_END__
|
||||
__DTOR_LIST_END__:
|
||||
.quad 0
|
||||
|
||||
.section .eh_frame, "a", @progbits
|
||||
.align 8
|
||||
.quad 0
|
||||
|
||||
.section .jcr, "aw", @progbits
|
||||
.align 8
|
||||
.quad 0
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
/* $NetBSD: crti.S,v 1.1 2013/07/11 06:57:15 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Matthew R. Green
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crti.S,v 1.1 2013/07/11 06:57:15 martin Exp $")
|
||||
|
||||
#include "sysident.S"
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.align 4
|
||||
.globl _init
|
||||
_init:
|
||||
save %sp, -176, %sp
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.align 4
|
||||
.globl _fini
|
||||
_fini:
|
||||
save %sp, -176, %sp
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
/* $NetBSD: crtn.S,v 1.1 2013/07/11 06:57:15 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Matthew R. Green
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ross Harvey
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crtn.S,v 1.1 2013/07/11 06:57:15 martin Exp $")
|
||||
|
||||
.section ".init", "ax", @progbits
|
||||
.align 4
|
||||
ret
|
||||
restore
|
||||
|
||||
.section ".fini", "ax", @progbits
|
||||
.align 4
|
||||
ret
|
||||
restore
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# $NetBSD: Makefile.inc,v 1.3 2013/06/25 00:30:07 matt Exp $
|
||||
|
||||
CPPFLAGS+= -I${ARCHDIR}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
/* $NetBSD: crt0.S,v 1.3 2013/06/21 15:54:08 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <vax/asm.h>
|
||||
|
||||
RCSID("$NetBSD: crt0.S,v 1.3 2013/06/21 15:54:08 matt Exp $")
|
||||
|
||||
STRONG_ALIAS(_start,__start)
|
||||
|
||||
_ENTRY(__start, 0x0101)
|
||||
movq %r8,-(%sp) /* ps_strings / obj */
|
||||
pushl %r7 /* cleanup */
|
||||
calls $3,___start
|
||||
END(__start)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user