This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
re: [patch]: enable m68k-netbsdelf target
- From: matthew green <mrg at cygnus dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 18 Dec 2001 18:35:30 +1100
- Subject: re: [patch]: enable m68k-netbsdelf target
- Organisation: Red Hat, Asia-Pacific.
this an update on the previous patch; it creates a correct
NetBSD m68k ELF emulation for ld(1) (text start address is
different on NetBSD.) it also adds bfd_elf32_m68k_vec
for the a.out NetBSD m68k BFD, for forward compatibility.
OK?
* bfd/config.bfd (m68*-*-netbsdelf*): New target.
(m68*-*-netbsd): Also include bfd_elf32_m68k_vec.
(m68*-*-netbsdaout*): New alias for m68*-*-netbsd.
* gas/configure.in (m68k-*-netbsdelf*): New target.
(m68k-*-netbsd*): Also include ELF support.
(m68k-*-netbsdaout*): New alias for m68*-*-netbsd*.
* gas/configure: Regenerate.
* ld/Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
(m68kelfnbsd.c): New rule.
* ld/Makefile.in: Regenerate.
* ld/configure.tgt (m68*-hp-netbsd*): Renamed to ..
(m68*-*-netbsd*4k*): .. this.
(m68*-*-netbsdelf*): New target.
(m68*-*-netbsd*): Also include ELF support.
(m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
* ld/emulparams/m68kelfnbsd.sh: New emulation.
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.74
diff -p -r1.74 config.bfd
*** config.bfd 2001/12/08 03:45:49 1.74
--- config.bfd 2001/12/18 07:30:31
*************** case "${targ}" in
*** 564,570 ****
targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
targ_underscore=yes
;;
! m68*-*-netbsd* | m68*-*-openbsd*)
targ_defvec=m68knetbsd_vec
targ_selvecs="m68k4knetbsd_vec hp300bsd_vec sunos_big_vec"
targ_underscore=yes
--- 564,579 ----
targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
targ_underscore=yes
;;
! m68*-*-netbsdelf*)
! targ_defvec=bfd_elf32_m68k_vec
! targ_selvecs="m68knetbsd_vec m68k4knetbsd_vec hp300bsd_vec sunos_big_vec"
! ;;
! m68*-*-netbsdaout* | m68*-*-netbsd*)
! targ_defvec=m68knetbsd_vec
! targ_selvecs="m68k4knetbsd_vec bfd_elf32_m68k_vec hp300bsd_vec sunos_big_vec"
! targ_underscore=yes
! ;;
! m68*-*-openbsd*)
targ_defvec=m68knetbsd_vec
targ_selvecs="m68k4knetbsd_vec hp300bsd_vec sunos_big_vec"
targ_underscore=yes
Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.85
diff -p -r1.85 configure.in
*** configure.in 2001/12/08 03:45:55 1.85
--- configure.in 2001/12/18 07:30:36
*************** changequote([,])dnl
*** 326,332 ****
m68k-*-linux-gnu*) fmt=elf em=linux ;;
m68k-*-gnu*) fmt=elf ;;
m68k-*-lynxos*) fmt=coff em=lynx ;;
! m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-apple-aux*) fmt=coff em=aux ;;
m68k-*-psos*) fmt=elf em=psos;;
--- 326,334 ----
m68k-*-linux-gnu*) fmt=elf em=linux ;;
m68k-*-gnu*) fmt=elf ;;
m68k-*-lynxos*) fmt=coff em=lynx ;;
! m68k-*-netbsdelf*) fmt=elf em=nbsd bfd_gas=yes ;;
! m68k-*-netbsdaout* | m68k-*-netbsd*)
! fmt=aout em=nbsd bfd_gas=yes ;;
m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-apple-aux*) fmt=coff em=aux ;;
m68k-*-psos*) fmt=elf em=psos;;
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.79
diff -p -r1.79 Makefile.am
*** Makefile.am 2001/12/17 23:54:57 1.79
--- Makefile.am 2001/12/18 07:30:38
*************** ALL_EMULATIONS = \
*** 207,212 ****
--- 207,213 ----
em68kaux.o \
em68kcoff.o \
em68kelf.o \
+ em68kelfnbsd.o \
em68klinux.o \
em68klynx.o \
em68knbsd.o \
*************** em68kelf.c: $(srcdir)/emulparams/m68kelf
*** 727,732 ****
--- 728,738 ----
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
+ em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
+ $(srcdir)/emulparams/m68kelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.71
diff -p -r1.71 configure.tgt
*** configure.tgt 2001/12/17 23:54:58 1.71
--- configure.tgt 2001/12/18 07:30:39
*************** m68k-*-linux-gnu*) targ_emul=m68kelf
*** 263,270 ****
;;
m68*-*-gnu*) targ_emul=m68kelf ;;
m68*-*-lynxos*) targ_emul=m68klynx ;;
! m68*-hp*-netbsd*) targ_emul=m68k4knbsd ;;
! m68*-*-netbsd*) targ_emul=m68knbsd ;;
m68*-*-psos*) targ_emul=m68kpsos ;;
m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
m68*-*-rtems*) targ_emul=m68kelf ;;
--- 263,275 ----
;;
m68*-*-gnu*) targ_emul=m68kelf ;;
m68*-*-lynxos*) targ_emul=m68klynx ;;
! m68*-*-netbsd*4k*) targ_emul=m68k4knbsd
! targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
! m68*-*-netbsdelf*) targ_emul=m68kelfnbsd
! targ_extra_emuls="m68knbsd m68k4knbsd" ;;
! m68*-*-netbsdaout* | m68*-*-netbsd*)
! targ_emul=m68knbsd
! targ_extra_emuls="m68kelfnbsd m68k4knbsd" ;;
m68*-*-psos*) targ_emul=m68kpsos ;;
m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
m68*-*-rtems*) targ_emul=m68kelf ;;
Index: ld/emulparams/m68kelfnbsd.sh
===================================================================
RCS file: m68kelfnbsd.sh
diff -N m68kelfnbsd.sh
*** /dev/null Tue May 5 13:32:27 1998
--- m68kelfnbsd.sh Mon Dec 17 23:30:39 2001
***************
*** 0 ****
--- 1,4 ----
+ . ${srcdir}/emulparams/m68kelf.sh
+ TEXT_START_ADDR=0x2000
+ TARGET_PAGE_SIZE=0x2000
+ MACHINE=