Add PowerPC LynxOS support

This commit is contained in:
Nick Clifton 2004-05-17 19:50:16 +00:00
parent 3c0b7db215
commit b2d65c0b3f
12 changed files with 85 additions and 26 deletions

View File

@ -1,3 +1,10 @@
2004-05-17 Adam Nemet <anemet@lnxw.com>
* 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 <dlheine@tensilica.com>
* aout-target.h (MY_bfd_copy_private_header_data): Define.

View File

@ -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"

View File

@ -1,3 +1,8 @@
2004-05-17 Adam Nemet <anemet@lnxw.com>
* configure.in: Add ppc-*-lynxos*. Update i386-*-lynxos* to ELF.
* configure: Regenerate.
2004-05-13 Paul Brook <paul@codesourcery.com>
* dw2gencfi.c (output_cie): Handle dwarf3 format CIE entries.

5
gas/configure vendored
View File

@ -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 ;;

View File

@ -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 ;;

View File

@ -1,3 +1,14 @@
2004-05-17 Adam Nemet <anemet@lnxw.com>
* 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 <joel@oarcorp.com>
* configure.tgt (or32-*-rtems*): Switch to elf and

View File

@ -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)"

View File

@ -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)"

View File

@ -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,"`

View File

@ -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 ;;

View File

@ -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=

20
ld/emulparams/ppclynx.sh Normal file
View File

@ -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) }"