From: Nick Clifton Date: Mon, 17 May 2004 19:50:16 +0000 (+0000) Subject: Add PowerPC LynxOS support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2d65c0b3f25a0ab30d1a4cd6a4f9000b4af239a;p=binutils-gdb.git Add PowerPC LynxOS support --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b5364ed2ba1..658846f68e1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2004-05-17 Adam Nemet + + * config.bfd (sparc-*-lynxos* case): Add to obsolete list. + (m68-*-lynxos* case): Likewise. + (powerpc-*-lyxnos* case): New case. + (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF. + 2004-05-17 David Heine * aout-target.h (MY_bfd_copy_private_header_data): Define. diff --git a/bfd/config.bfd b/bfd/config.bfd index 87071825cc6..53c2051300e 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -31,8 +31,10 @@ targ_underscore=no # Catch obsolete configurations. case $targ in - vax-*-vms* \ - ) + m68*-*-lynxos* | \ + sparc-*-lynxos* | \ + vax-*-vms* | \ + null) if test "x$enable_obsolete" != xyes; then echo "*** Configuration $targ is obsolete." >&2 echo "*** Specify --enable-obsolete to build it anyway." >&2 @@ -519,8 +521,8 @@ case "${targ}" in ;; #endif i[3-7]86-*-lynxos*) - targ_defvec=i386lynx_coff_vec - targ_selvecs=i386lynx_aout_vec + targ_defvec=bfd_elf32_i386_vec + targ_selvecs="i386lynx_coff_vec i386lynx_aout_vec" ;; i[3-7]86-*-gnu*) targ_defvec=bfd_elf32_i386_vec @@ -979,6 +981,11 @@ case "${targ}" in powerpc-*-macos*) targ_defvec=pmac_xcoff_vec ;; + powerpc-*-lynxos*) + targ_defvec=bfd_elf32_powerpc_vec + targ_selvecs="rs6000coff_vec" + targ_cflags=-DSMALL_ARCHIVE + ;; powerpc-*-netware*) targ_defvec=bfd_elf32_powerpc_vec targ_selvecs="nlm32_powerpc_vec rs6000coff_vec" diff --git a/gas/ChangeLog b/gas/ChangeLog index eec43a82179..7581ea7d6df 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2004-05-17 Adam Nemet + + * configure.in: Add ppc-*-lynxos*. Update i386-*-lynxos* to ELF. + * configure: Regenerate. + 2004-05-13 Paul Brook * dw2gencfi.c (output_cie): Handle dwarf3 format CIE entries. diff --git a/gas/configure b/gas/configure index 05fa1958fbb..666d7836939 100755 --- a/gas/configure +++ b/gas/configure @@ -4320,7 +4320,7 @@ for this_target in $target $canon_targets ; do i386-*-linux*coff*) fmt=coff em=linux ;; i386-*-linux-gnu*) fmt=elf em=linux ;; x86_64-*-linux-gnu*) fmt=elf em=linux ;; - i386-*-lynxos*) fmt=coff em=lynx ;; + i386-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; i386-*-sysv[45]*) fmt=elf ;; i386-*-solaris*) fmt=elf ;; i386-*-freebsdaout*) fmt=aout em=386bsd ;; @@ -4491,8 +4491,9 @@ echo "$as_me: error: Solaris must be configured little endian" >&2;} ppc-*-rtems*) fmt=elf ;; ppc-*-macos*) fmt=coff em=macos ;; ppc-*-netware*) fmt=elf em=ppcnw ;; - ppc-**-nto*) fmt=elf ;; + ppc-*-nto*) fmt=elf ;; ppc-*-kaos*) fmt=elf ;; + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; s390x-*-linux-gnu*) fmt=elf em=linux ;; s390-*-linux-gnu*) fmt=elf em=linux ;; diff --git a/gas/configure.in b/gas/configure.in index 1812b10828a..446f68970ff 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -281,7 +281,7 @@ changequote([,])dnl i386-*-linux*coff*) fmt=coff em=linux ;; i386-*-linux-gnu*) fmt=elf em=linux ;; x86_64-*-linux-gnu*) fmt=elf em=linux ;; - i386-*-lynxos*) fmt=coff em=lynx ;; + i386-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; changequote(,)dnl i386-*-sysv[45]*) fmt=elf ;; i386-*-solaris*) fmt=elf ;; @@ -435,8 +435,9 @@ changequote([,])dnl ppc-*-rtems*) fmt=elf ;; ppc-*-macos*) fmt=coff em=macos ;; ppc-*-netware*) fmt=elf em=ppcnw ;; - ppc-**-nto*) fmt=elf ;; + ppc-*-nto*) fmt=elf ;; ppc-*-kaos*) fmt=elf ;; + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; s390x-*-linux-gnu*) fmt=elf em=linux ;; s390-*-linux-gnu*) fmt=elf em=linux ;; diff --git a/ld/ChangeLog b/ld/ChangeLog index fb0159de53f..b8248eadc9f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,14 @@ +2004-05-17 Adam Nemet + + * configure.tgt (powerpc-*-lynxos* case): New case. + * configure.host (i[3-7]86-*-lynxos* case): Remove case. + * emulparams/ppclynx.sh: New file. + * emulparams/i386lynx.sh (SCRIPT_NAME): Update to LynxOS 4.0. + * Makefile.am (ALL_EMULATIONS): Add eppclynx.o + (ei386lynx.c): Update rule to LynxOS 4.0 ELF. + (eppclynx.c): New rule. + * Makefile.in: Regenerate. + 2004-05-13 Joel Sherrill * configure.tgt (or32-*-rtems*): Switch to elf and diff --git a/ld/Makefile.am b/ld/Makefile.am index 308d422d1ef..b93574cd7e9 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -315,6 +315,7 @@ ALL_EMULATIONS = \ eppcmacos.o \ eppcnw.o \ eppcpe.o \ + eppclynx.o \ eriscix.o \ esa29200.o \ esh.o \ @@ -940,7 +941,7 @@ ei386linux.c: $(srcdir)/emulparams/i386linux.sh \ $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386linux "$(tdir_i386linux)" ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386lynx "$(tdir_i386lynx)" ei386mach.c: $(srcdir)/emulparams/i386mach.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} @@ -1274,6 +1275,9 @@ eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \ eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS} ${GENSCRIPTS} ppcpe "$(tdir_ppcpe)" +eppclynx.c: $(srcdir)/emulparams/ppclynx.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} ppclynx "$(tdir_ppclynx)" eriscix.c: $(srcdir)/emulparams/riscix.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} riscix "$(tdir_riscix)" diff --git a/ld/Makefile.in b/ld/Makefile.in index 40051ef11b1..e0f5c6d87d2 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -429,6 +429,7 @@ ALL_EMULATIONS = \ eppcmacos.o \ eppcnw.o \ eppcpe.o \ + eppclynx.o \ eriscix.o \ esa29200.o \ esh.o \ @@ -1666,7 +1667,7 @@ ei386linux.c: $(srcdir)/emulparams/i386linux.sh \ $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386linux "$(tdir_i386linux)" ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386lynx "$(tdir_i386lynx)" ei386mach.c: $(srcdir)/emulparams/i386mach.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} @@ -2000,6 +2001,9 @@ eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \ eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS} ${GENSCRIPTS} ppcpe "$(tdir_ppcpe)" +eppclynx.c: $(srcdir)/emulparams/ppclynx.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} ppclynx "$(tdir_ppclynx)" eriscix.c: $(srcdir)/emulparams/riscix.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} riscix "$(tdir_riscix)" diff --git a/ld/configure.host b/ld/configure.host index f2e1eb42f0b..4c2af079e0d 100644 --- a/ld/configure.host +++ b/ld/configure.host @@ -132,11 +132,6 @@ i[3-7]86-*-sco* | i[3-7]86-*-isc*) HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o' ;; -i[3-7]86-*-lynxos*) - HOSTING_CRT0=/lib/init1.o - HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o' - ;; - i[3-7]86-pc-interix*) HOSTING_CRT0='$$INTERIX_ROOT/usr/lib/crt0.o' HOSTING_LIBS='-L $$X/local_bin -L $$INTERIX_ROOT/usr/lib '"$HOSTING_LIBS"' -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a' @@ -173,11 +168,6 @@ m68*-*-linux-gnu*) HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"` ;; -m68*-*-lynxos*) - HOSTING_CRT0=/lib/init1.o - HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o' - ;; - m68*-motorola-sysv) HOSTING_CRT0='`if [ -f ../gcc/crt0.o ]; then echo ../gcc/crt0.o; elif [ -f \`${CC} -print-file-name=\`crt0.o ]; then echo \`${CC} -print-file-name=\`crt0.o; else echo /lib/crt0.o; fi`' HOSTING_LIBS=`echo "$HOSTING_LIBS" | sed -e "s,-lc,-lc881,"` diff --git a/ld/configure.tgt b/ld/configure.tgt index cd4274c4067..65f1d76a433 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -534,6 +534,7 @@ powerpc-*-aix5*) targ_emul=aix5ppc ;; powerpc-*-aix*) targ_emul=aixppc ;; powerpc-*-beos*) targ_emul=aixppc ;; powerpc-*-windiss*) targ_emul=elf32ppcwindiss ;; +powerpc-*-lynxos*) targ_emul=ppclynx ;; rs6000-*-aix5*) targ_emul=aix5rs6 ;; rs6000-*-aix*) targ_emul=aixrs6 ;; tic30-*-*aout*) targ_emul=tic30aout ;; diff --git a/ld/emulparams/i386lynx.sh b/ld/emulparams/i386lynx.sh index 988c1751b08..3235ebea01a 100644 --- a/ld/emulparams/i386lynx.sh +++ b/ld/emulparams/i386lynx.sh @@ -1,9 +1,17 @@ -SCRIPT_NAME=i386lynx -OUTPUT_FORMAT="coff-i386-lynx" -# This is what LynxOS /lib/init1.o wants. +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386" ENTRY=_main -# following are dubious -TARGET_PAGE_SIZE=0x1000 -TEXT_START_ADDR=0 +TEXT_BASE=0x0 +DYN_TEXT_BASE=0x00400000 +TEXT_START_ADDR="(DEFINED(_DYNAMIC) ? ${DYN_TEXT_BASE} : ${TEXT_BASE})" +MAXPAGESIZE=0x1000 NONPAGED_TEXT_START_ADDR=0x1000 ARCH=i386 +MACHINE= +NOP=0x9090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +ELF_INTERPRETER_NAME=\"/usr/lib/ld.so.1\" + +# Leave room of SIZEOF_HEADERS before text. +EMBEDDED= diff --git a/ld/emulparams/ppclynx.sh b/ld/emulparams/ppclynx.sh new file mode 100644 index 00000000000..2534687114e --- /dev/null +++ b/ld/emulparams/ppclynx.sh @@ -0,0 +1,20 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-powerpc" +TEXT_BASE=0x00002000 +DYN_TEXT_BASE=0x00400000 +TEXT_START_ADDR="(DEFINED(_DYNAMIC) ? ${DYN_TEXT_BASE} : ${TEXT_BASE})" +MAXPAGESIZE=0x10000 +NONPAGED_TEXT_START_ADDR=0x1000 +ARCH=powerpc +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +ELF_INTERPRETER_NAME=\"/usr/lib/ld.so.1\" + +# Leave room of SIZEOF_HEADERS before text. +EMBEDDED= +# PLT on PowerPC is generated at run-time. +BSS_PLT= +OTHER_READWRITE_SECTIONS=" + .got1 ${RELOCATING-0} : { *(.got1) } + .got2 ${RELOCATING-0} : { *(.got2) }"