summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/ld
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-10-08 21:12:40 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-10-08 21:12:40 +0000
commit6ba975deb33fa023a726a86ada7698e93993a558 (patch)
tree16430e4d3f6df637392aecafa57d014e74ce0254 /gnu/usr.bin/binutils/ld
parent8601718a4028cd324ccb56d9607fb055185023bd (diff)
Define superH obsd-specific emulations for ld, and use it by default.
Diffstat (limited to 'gnu/usr.bin/binutils/ld')
-rw-r--r--gnu/usr.bin/binutils/ld/Makefile.am13
-rw-r--r--gnu/usr.bin/binutils/ld/Makefile.in13
-rw-r--r--gnu/usr.bin/binutils/ld/configure.tgt6
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/shelf_obsd.sh16
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/shlelf_obsd.sh3
5 files changed, 50 insertions, 1 deletions
diff --git a/gnu/usr.bin/binutils/ld/Makefile.am b/gnu/usr.bin/binutils/ld/Makefile.am
index 29cfe400b30..53572dea70a 100644
--- a/gnu/usr.bin/binutils/ld/Makefile.am
+++ b/gnu/usr.bin/binutils/ld/Makefile.am
@@ -337,6 +337,8 @@ ALL_EMULATIONS = \
eshlelf_nbsd.o \
eshelf_nto.o \
eshlelf_nto.o \
+ eshelf_obsd.o \
+ eshlelf_obsd.o \
eshl.o \
eshlelf.o \
eshpe.o \
@@ -1394,6 +1396,17 @@ eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
+eshelf_obsd.c: $(srcdir)/emulparams/shelf_obsd.sh \
+ $(srcdir)/emulparams/shelf.sh \
+ $(srcdir)/emulparams/elf_obsd.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_obsd "$(tdir_shelf_obsd)"
+eshlelf_obsd.c: $(srcdir)/emulparams/shlelf_obsd.sh \
+ $(srcdir)/emulparams/shelf_obsd.sh \
+ $(srcdir)/emulparams/shelf.sh \
+ $(srcdir)/emulparams/elf_obsd.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf_obsd "$(tdir_shlelf_obsd)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
diff --git a/gnu/usr.bin/binutils/ld/Makefile.in b/gnu/usr.bin/binutils/ld/Makefile.in
index 7a80545d940..ad99274b2ff 100644
--- a/gnu/usr.bin/binutils/ld/Makefile.in
+++ b/gnu/usr.bin/binutils/ld/Makefile.in
@@ -451,6 +451,8 @@ ALL_EMULATIONS = \
eshlelf_nbsd.o \
eshelf_nto.o \
eshlelf_nto.o \
+ eshelf_obsd.o \
+ eshlelf_obsd.o \
eshl.o \
eshlelf.o \
eshpe.o \
@@ -2120,6 +2122,17 @@ eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
+eshelf_obsd.c: $(srcdir)/emulparams/shelf_obsd.sh \
+ $(srcdir)/emulparams/shelf.sh \
+ $(srcdir)/emulparams/elf_obsd.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_obsd "$(tdir_shelf_obsd)"
+eshlelf_obsd.c: $(srcdir)/emulparams/shlelf_obsd.sh \
+ $(srcdir)/emulparams/shelf_obsd.sh \
+ $(srcdir)/emulparams/shelf.sh \
+ $(srcdir)/emulparams/elf_obsd.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf_obsd "$(tdir_shlelf_obsd)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
diff --git a/gnu/usr.bin/binutils/ld/configure.tgt b/gnu/usr.bin/binutils/ld/configure.tgt
index 6692e3e26ee..f6aca64deac 100644
--- a/gnu/usr.bin/binutils/ld/configure.tgt
+++ b/gnu/usr.bin/binutils/ld/configure.tgt
@@ -334,7 +334,7 @@ sh64-*-netbsd*)
targ_emul=shelf64_nbsd
targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd"
;;
-sh*l*-*-netbsdelf*|sh*-*-openbsd*)
+sh*l*-*-netbsdelf*)
targ_emul=shlelf_nbsd
targ_extra_emuls=shelf_nbsd
;;
@@ -342,6 +342,10 @@ sh*-*-netbsdelf*)
targ_emul=shelf_nbsd
targ_extra_emuls=shlelf_nbsd
;;
+sh*-*-openbsd*)
+ targ_emul=shlelf_obsd
+ targ_extra_emuls=shelf_obsd
+ ;;
shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
targ_emul=shlelf
targ_extra_emuls="shelf shl sh"
diff --git a/gnu/usr.bin/binutils/ld/emulparams/shelf_obsd.sh b/gnu/usr.bin/binutils/ld/emulparams/shelf_obsd.sh
new file mode 100644
index 00000000000..03883ef4ab6
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/shelf_obsd.sh
@@ -0,0 +1,16 @@
+# If you change this file, please alsolook at files which source this one:
+# shlelf_obsd.sh
+
+. ${srcdir}/emulparams/shelf.sh
+. ${srcdir}/emulparams/elf_obsd.sh
+
+OUTPUT_FORMAT="elf32-sh-obsd"
+TEXT_START_ADDR=0x400000
+MAXPAGESIZE=0x10000
+
+DATA_START_SYMBOLS='__data_start = . ;';
+
+ENTRY=_start
+
+unset EMBEDDED
+unset OTHER_SECTIONS
diff --git a/gnu/usr.bin/binutils/ld/emulparams/shlelf_obsd.sh b/gnu/usr.bin/binutils/ld/emulparams/shlelf_obsd.sh
new file mode 100644
index 00000000000..dfab67a2ca1
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/shlelf_obsd.sh
@@ -0,0 +1,3 @@
+. ${srcdir}/emulparams/shelf_obsd.sh
+
+OUTPUT_FORMAT="elf32-shl-obsd"