Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu ld.new for NetBSD/sh3
details: https://anonhg.NetBSD.org/src/rev/18029e3b59a0
branches: trunk
changeset: 479914:18029e3b59a0
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Sun Dec 26 19:59:22 1999 +0000
description:
ld.new for NetBSD/sh3
diffstat:
gnu/dist/ld/Makefile.am | 12 +++++++
gnu/dist/ld/Makefile.in | 12 +++++++
gnu/dist/ld/emulparams/elf32shlunx.sh | 15 +++++++++
gnu/dist/ld/emulparams/elf32shunx.sh | 15 +++++++++
gnu/dist/ld/emulparams/shlunx.sh | 5 +++
gnu/dist/ld/emulparams/shunx.sh | 5 +++
gnu/dist/ld/scripttempl/shunx.sc | 53 +++++++++++++++++++++++++++++++++++
gnu/usr.bin/ld.new/Makefile | 14 +++++++-
8 files changed, 129 insertions(+), 2 deletions(-)
diffs (199 lines):
diff -r d3aa6af364c1 -r 18029e3b59a0 gnu/dist/ld/Makefile.am
--- a/gnu/dist/ld/Makefile.am Sun Dec 26 19:48:00 1999 +0000
+++ b/gnu/dist/ld/Makefile.am Sun Dec 26 19:59:22 1999 +0000
@@ -488,6 +488,18 @@
eshl.c: $(srcdir)/emulparams/shl.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} shl "$(tdir_shl)"
+eshunx.c: $(srcdir)/emulparams/shunx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shunx "$(tdir_shunx)"
+eshlunx.c: $(srcdir)/emulparams/shlunx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/shunx.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlunx "$(tdir_shlunx)"
+eelf32shunx.c: $(srcdir)/emulparams/elf32shunx.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32shunx "$(tdir_elf32shunx)"
+eelf32shlunx.c: $(srcdir)/emulparams/elf32shlunx.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32shlunx "$(tdir_elf32shlunx)"
esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
diff -r d3aa6af364c1 -r 18029e3b59a0 gnu/dist/ld/Makefile.in
--- a/gnu/dist/ld/Makefile.in Sun Dec 26 19:48:00 1999 +0000
+++ b/gnu/dist/ld/Makefile.in Sun Dec 26 19:59:22 1999 +0000
@@ -998,6 +998,18 @@
eshl.c: $(srcdir)/emulparams/shl.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} shl "$(tdir_shl)"
+eshunx.c: $(srcdir)/emulparams/shunx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shunx "$(tdir_shunx)"
+eshlunx.c: $(srcdir)/emulparams/shlunx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/shunx.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlunx "$(tdir_shlunx)"
+eelf32shunx.c: $(srcdir)/emulparams/elf32shunx.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32shunx "$(tdir_elf32shunx)"
+eelf32shlunx.c: $(srcdir)/emulparams/elf32shlunx.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32shlunx "$(tdir_elf32shlunx)"
esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
diff -r d3aa6af364c1 -r 18029e3b59a0 gnu/dist/ld/emulparams/elf32shlunx.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/ld/emulparams/elf32shlunx.sh Sun Dec 26 19:59:22 1999 +0000
@@ -0,0 +1,15 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-shl-unx"
+TEXT_START_ADDR=0x1000
+MAXPAGESIZE=0x1000
+ARCH=sh
+MACHINE=
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+
+# These are for compatibility with the COFF toolchain.
+ENTRY=start
+CTOR_START='___ctors = .;'
+CTOR_END='___ctors_end = .;'
+DTOR_START='___dtors = .;'
+DTOR_END='___dtors_end = .;'
diff -r d3aa6af364c1 -r 18029e3b59a0 gnu/dist/ld/emulparams/elf32shunx.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/ld/emulparams/elf32shunx.sh Sun Dec 26 19:59:22 1999 +0000
@@ -0,0 +1,15 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-sh-unx"
+TEXT_START_ADDR=0x1000
+MAXPAGESIZE=0x1000
+ARCH=sh
+MACHINE=
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+
+# These are for compatibility with the COFF toolchain.
+ENTRY=start
+CTOR_START='___ctors = .;'
+CTOR_END='___ctors_end = .;'
+DTOR_START='___dtors = .;'
+DTOR_END='___dtors_end = .;'
diff -r d3aa6af364c1 -r 18029e3b59a0 gnu/dist/ld/emulparams/shlunx.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/ld/emulparams/shlunx.sh Sun Dec 26 19:59:22 1999 +0000
@@ -0,0 +1,5 @@
+SCRIPT_NAME=shunx
+OUTPUT_FORMAT="coff-shl"
+TEXT_START_ADDR=0x1000
+TARGET_PAGE_SIZE=0x1000
+ARCH=sh
diff -r d3aa6af364c1 -r 18029e3b59a0 gnu/dist/ld/emulparams/shunx.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/ld/emulparams/shunx.sh Sun Dec 26 19:59:22 1999 +0000
@@ -0,0 +1,5 @@
+SCRIPT_NAME=shunx
+OUTPUT_FORMAT="coff-sh"
+TEXT_START_ADDR=0x1000
+TARGET_PAGE_SIZE=0x1000
+ARCH=sh
diff -r d3aa6af364c1 -r 18029e3b59a0 gnu/dist/ld/scripttempl/shunx.sc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/ld/scripttempl/shunx.sc Sun Dec 26 19:59:22 1999 +0000
@@ -0,0 +1,53 @@
+TORS=".tors :
+ {
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;
+ }"
+
+
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+OUTPUT_ARCH(${ARCH})
+${LIB_SEARCH_DIRS}
+
+SECTIONS
+{
+ . = ${TEXT_START_ADDR} + SIZEOF_HEADERS;
+ .text ALIGN(0x10):
+ {
+ *(.text)
+ *(.strings)
+ ${RELOCATING+ _etext = . ; }
+ }
+ ${CONSTRUCTING+${TORS}}
+ .data ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
+ {
+ *(.data)
+ ${RELOCATING+ _edata = . ; }
+ }
+ .bss ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
+ {
+ ${RELOCATING+ _bss_start = . ; }
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
+ }
+ .stack :
+ {
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
+ }
+ .stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ *(.stab)
+ }
+ .stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ *(.stabstr)
+ }
+}
+EOF
diff -r d3aa6af364c1 -r 18029e3b59a0 gnu/usr.bin/ld.new/Makefile
--- a/gnu/usr.bin/ld.new/Makefile Sun Dec 26 19:48:00 1999 +0000
+++ b/gnu/usr.bin/ld.new/Makefile Sun Dec 26 19:59:22 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 1999/08/21 06:30:12 simonb Exp $
+# $NetBSD: Makefile,v 1.16 1999/12/26 19:59:23 msaitoh Exp $
# for OBJECT_FMT, UNPRIVILEGED
.include <bsd.own.mk>
@@ -13,6 +13,7 @@
(${MACHINE_ARCH} == "mipseb") || \
(${MACHINE_ARCH} == "mipsel") || \
(${MACHINE_ARCH} == "powerpc") || \
+ (${MACHINE_ARCH} == "sh3") || \
(${MACHINE_ARCH} == "sparc" && defined(ELF_PLEASE)) || \
(${MACHINE_ARCH} == "sparc64")
PROG= ld
@@ -72,6 +73,14 @@
EMULS.powerpc= elf32ppc
DEFAULT_EMUL.powerpc= elf32ppc
+##### sh3 #####
+EMULS.sh3= shunx shlunx elf32shunx elf32shlunx
+.if defined(ELF_PLEASE)
+DEFAULT_EMUL.sh3= elf32shunx
+.else
+DEFAULT_EMUL.sh3= shunx
+.endif
+
##### sparc #####
EMULS.sparc= sparcnbsd elf32_sparc sun4
.if defined(ELF_PLEASE)
@@ -86,7 +95,8 @@
ALL_EMULS!= (for i in ${EMULS.alpha} ${EMULS.i386} ${EMULS.m68k} \
${EMULS.mipseb} ${EMULS.mipsel} ${EMULS.powerpc} \
- ${EMULS.sparc} ${EMULS.sparc64}; do echo $$i; done) | \
+ ${EMULS.sh3} ${EMULS.sparc} ${EMULS.sparc64}; \
+ do echo $$i; done) | \
sort | uniq
LIB_PATH= ${LIBDIR} # passed to genscripts
Home |
Main Index |
Thread Index |
Old Index