diff --git a/ld/Makefile.am b/ld/Makefile.am index 72bb59fa7e..8247d25d93 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -198,6 +198,7 @@ ALL_EMULATIONS = \ ehppaelf.o \ ehppalinux.o \ ehppanbsd.o \ + ehppaobsd.o \ ei386aout.o \ ei386beos.o \ ei386bsd.o \ @@ -768,6 +769,10 @@ ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)" +ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)" ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)" diff --git a/ld/Makefile.in b/ld/Makefile.in index a37771c71d..f9d9fa492c 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -309,6 +309,7 @@ ALL_EMULATIONS = \ ehppaelf.o \ ehppalinux.o \ ehppanbsd.o \ + ehppaobsd.o \ ei386aout.o \ ei386beos.o \ ei386bsd.o \ @@ -1491,6 +1492,10 @@ ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)" +ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)" ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)" diff --git a/ld/configure.tgt b/ld/configure.tgt index c91da0e1eb..c1d7620c8d 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -70,7 +70,8 @@ sparc*-*-linux-gnu*) targ_emul=elf32_sparc tdir_sun4=sparc-sun-sunos4 ;; sparc*-*-lynxos*) targ_emul=sparclynx ;; -sparc64-*-netbsd*) targ_emul=elf64_sparc +sparc64-*-netbsd* | sparc64-*-openbsd*) + targ_emul=elf64_sparc targ_extra_emuls="elf32_sparc" ;; sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;; @@ -348,6 +349,7 @@ hppa*-*-linux-gnu*) targ_emul=hppalinux ;; hppa*-*-*elf*) targ_emul=hppaelf ;; hppa*-*-lites*) targ_emul=hppaelf ;; hppa*-*-netbsd*) targ_emul=hppanbsd ;; +hppa*-*-openbsd*) targ_emul=hppaobsd ;; hppa*-*-rtems*) targ_emul=hppaelf ;; vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;; vax-*-netbsdelf*) targ_emul=elf32vax @@ -413,6 +415,7 @@ alpha*-*-osf*) targ_emul=alpha ;; alpha*-*-gnu*) targ_emul=elf64alpha ;; alpha*-*-netware*) targ_emul=alpha ;; alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd ;; +alpha*-*-openbsd*) targ_emul=elf64alpha ;; z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;; ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;; ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;; @@ -451,7 +454,7 @@ powerpc*le-*-elf* | powerpc*le-*-eabi* | powerpc*le-*-solaris* \ targ_extra_emuls="elf32ppcsim" ;; esac ;; powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \ - | powerpc*-*-netbsd* | powerpc*-*-vxworks*) + | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-vxworks*) case "${targ}" in *64*) targ_emul=elf64ppc targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" diff --git a/ld/emulparams/hppaobsd.sh b/ld/emulparams/hppaobsd.sh new file mode 100644 index 0000000000..ff120b97f8 --- /dev/null +++ b/ld/emulparams/hppaobsd.sh @@ -0,0 +1,5 @@ +. ${srcdir}/emulparams/hppanbsd.sh + +TEXT_START_ADDR=0x1000 +TARGET_PAGE_SIZE=0x1000 +MAXPAGESIZE=0x1000