This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Update LynxOS support


Hi,

The patch below brings LynxOS support in binutils up to date.

It removes m68k and sparc LynxOS targets.  These targets are no longer
supported by LynuxWorks.  I am not sure whether it is fine to just
simply remove them or they should be properly obsoleted.

For x86 and PowerPC the patch changes the primary object format from
COFF to ELF.  COFF needs to remain supported as kernel modules are in
COFF.

Please apply if OK.

Adam

include/coff/ChangeLog:

<date>  Adam Nemet  <anemet@lnxw.com> 
 
        * sparc.h (LYNXCOFFMAGIC): Remove macro. 
        * m68k.h (LYNXCOFFMAGIC): Likewise. 
        (M68KBADMAG): Remove LYNXCOFFMAGIC. 

bfd/ChangeLog:

<date>  Adam Nemet  <anemet@lnxw.com> 
 
        * config.bfd (sparc-*-lynxos* case): Remove case. 
        (m68-*-lynxos* case): Remove case. 
        (powerpc-*-lyxnos* case): New case. 
        (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF. 
        * cf-sparclynx.c: Remove file. 
        * sparclynx.c: Remove file. 
        * cf-m68klynx.c: Remove file. 
        * m68klynx.c: Remove file. 
        * coff-sparc.c (BADMAG): Remove LynxOS COFF support. 
        * coffcode.h (coff_set_arch_mach_hook): Remove COFF support for 
        sparc and m68k.
        (coff_set_flags): Likewise. 
        (coff_write_object_contents): Likewise. 

gas/ChangeLog:

<date>  Adam Nemet  <anemet@lnxw.com> 
 
        * configure.in: Add ppc-*-lynxos*.  Update i386-*-lynxos* to ELF. 
        (m68-*-lynxos* case): Remove case. 
        (sparc-*-lynxos* case): Remove case. 
        * configure: Regenerate. 
 
ld/ChangeLog:

<date>  Adam Nemet  <anemet@lnxw.com> 
 
        * configure.tgt (powerpc-*-lynxos* case): New case. 
        (sparc*-*-lynxos* case): Remove case. 
        (m68*-*-lynxos* case): Remove case. 
        * configure.host (i[3-7]86-*-lynxos* case): Remove case. 
        (m68*-*-lynxos* case): Remove case. 
        * emulparams/m68klynx.sh: Remove file. 
        * emulparams/sparclynx.sh: Remove file. 
        * scripttempl/m68klynx.sc: Remove file. 
        * emulparams/sparclynx.sc: Remove file. 
        * emulparams/ppclynx.sh: New file. 
        * emulparams/i386lynx.sh (SCRIPT_NAME): Update to LynxOS 4.0. 
        * scripttempl/i386lynx.sc: Remove file. 
        * Makefile.am (ALL_EMULATIONS): Add eppclynx.o 
        (ei386lynx.c): Update rule to LynxOS 4.0 ELF. 
        (eppclynx.c): New rule. 
        * Makefile.in: Regenerate. 

Index: include/coff/m68k.h
===================================================================
RCS file: /cvs/src/src/include/coff/m68k.h,v
retrieving revision 1.2
diff -u -p -r1.2 m68k.h
--- include/coff/m68k.h	14 Mar 2001 02:27:43 -0000	1.2
+++ include/coff/m68k.h	14 May 2004 00:46:29 -0000
@@ -34,10 +34,6 @@
 /* This is the magic of the Bull dpx/2 */
 #define MC68KBCSMAGIC	0526
 
-/* This is Lynx's all-platform magic number for executables. */
-
-#define LYNXCOFFMAGIC	0415
-
 #define OMAGIC M68MAGIC
 
 /* This intentionally does not include MC68KBCSMAGIC; it only includes
@@ -48,8 +44,7 @@
                     && ((x).f_magic != MC68KROMAGIC) \
                     && ((x).f_magic != MC68KPGMAGIC) \
                     && ((x).f_magic != M68MAGIC) \
-                    && ((x).f_magic != M68TVMAGIC) \
-                    && ((x).f_magic != LYNXCOFFMAGIC))
+                    && ((x).f_magic != M68TVMAGIC))
 
 /* Magic numbers for the a.out header.  */
 
Index: include/coff/sparc.h
===================================================================
RCS file: /cvs/src/src/include/coff/sparc.h,v
retrieving revision 1.2
diff -u -p -r1.2 sparc.h
--- include/coff/sparc.h	14 Mar 2001 02:27:43 -0000	1.2
+++ include/coff/sparc.h	14 May 2004 00:46:29 -0000
@@ -34,10 +34,6 @@
 
 #define SPARCMAGIC	(0540)
 
-/* This is Lynx's all-platform magic number for executables. */
-
-#define LYNXCOFFMAGIC	(0415)
-
 #define OMAGIC          0404    /* object files, eg as output */
 #define ZMAGIC          0413    /* demand load format, eg normal ld output */
 #define STMAGIC		0401	/* target shlib */
Index: bfd/coff-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-sparc.c,v
retrieving revision 1.10
diff -u -p -r1.10 coff-sparc.c
--- bfd/coff-sparc.c	4 Nov 2003 11:30:54 -0000	1.10
+++ bfd/coff-sparc.c	14 May 2004 00:46:29 -0000
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suit
 
 #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
 
-#define BADMAG(x) ((x).f_magic != SPARCMAGIC && (x).f_magic != LYNXCOFFMAGIC)
+#define BADMAG(x) ((x).f_magic != SPARCMAGIC)
 
 /* The page size is a guess based on ELF.  */
 #define COFF_PAGE_SIZE 0x10000
Index: bfd/coffcode.h
===================================================================
RCS file: /cvs/src/src/bfd/coffcode.h,v
retrieving revision 1.104
diff -u -p -r1.104 coffcode.h
--- bfd/coffcode.h	7 May 2004 15:08:48 -0000	1.104
+++ bfd/coffcode.h	14 May 2004 00:46:30 -0000
@@ -1917,7 +1917,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
     case I386MAGIC:
     case I386PTXMAGIC:
     case I386AIXMAGIC:		/* Danbury PS/2 AIX C Compiler */
-    case LYNXCOFFMAGIC:	/* shadows the m68k Lynx number below, sigh */
+    case LYNXCOFFMAGIC:
       arch = bfd_arch_i386;
       break;
 #endif
@@ -1968,9 +1968,6 @@ coff_set_arch_mach_hook (abfd, filehdr)
 #ifdef APOLLOM68KMAGIC
     case APOLLOM68KMAGIC:
 #endif
-#ifdef LYNXCOFFMAGIC
-    case LYNXCOFFMAGIC:
-#endif
       arch = bfd_arch_m68k;
       machine = bfd_mach_m68020;
       break;
@@ -2190,9 +2187,6 @@ coff_set_arch_mach_hook (abfd, filehdr)
 
 #ifdef SPARCMAGIC
     case SPARCMAGIC:
-#ifdef LYNXCOFFMAGIC
-    case LYNXCOFFMAGIC:
-#endif
       arch = bfd_arch_sparc;
       break;
 #endif
@@ -2784,10 +2778,6 @@ coff_set_flags (abfd, magicp, flagsp)
       *magicp = MC68MAGIC;
 #endif
 #endif
-#ifdef LYNXOS
-      /* Just overwrite the usual value if we're doing Lynx.  */
-      *magicp = LYNXCOFFMAGIC;
-#endif
       return TRUE;
       break;
 #endif
@@ -2845,10 +2835,6 @@ coff_set_flags (abfd, magicp, flagsp)
 #ifdef SPARCMAGIC
     case bfd_arch_sparc:
       *magicp = SPARCMAGIC;
-#ifdef LYNXOS
-      /* Just overwrite the usual value if we're doing Lynx.  */
-      *magicp = LYNXCOFFMAGIC;
-#endif
       return TRUE;
       break;
 #endif
@@ -3979,9 +3965,6 @@ coff_write_object_contents (abfd)
 
 #if defined(M68) || defined(WE32K) || defined(M68K)
 #define __A_MAGIC_SET__
-#if defined(LYNXOS)
-    internal_a.magic = LYNXCOFFMAGIC;
-#else
 #if defined(TARG_AUX)
     internal_a.magic = (abfd->flags & D_PAGED ? PAGEMAGICPEXECPAGED :
 			abfd->flags & WP_TEXT ? PAGEMAGICPEXECSWAPPED :
@@ -3991,7 +3974,6 @@ coff_write_object_contents (abfd)
     internal_a.magic = PAGEMAGICPEXECPAGED;
 #endif
 #endif /* TARG_AUX */
-#endif /* LYNXOS */
 #endif /* M68 || WE32K || M68K */
 
 #if defined(ARM)
@@ -4025,9 +4007,6 @@ coff_write_object_contents (abfd)
 
 #if defined(SPARC)
 #define __A_MAGIC_SET__
-#if defined(LYNXOS)
-    internal_a.magic = LYNXCOFFMAGIC;
-#endif /* LYNXOS */
 #endif /* SPARC */
 
 #ifdef RS6000COFF_C
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.159
diff -u -p -r1.159 config.bfd
--- bfd/config.bfd	6 May 2004 02:46:29 -0000	1.159
+++ bfd/config.bfd	14 May 2004 00:46:31 -0000
@@ -519,8 +519,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
@@ -697,10 +697,6 @@ case "${targ}" in
     # targ_selvecs=m68kmach3_vec
     # targ_cflags=-DSTAT_FOR_EXEC
     ;;
-  m68*-*-lynxos*)
-    targ_defvec=m68klynx_coff_vec
-    targ_selvecs=m68klynx_aout_vec
-    ;;
   m68*-hp*-netbsd*)
     targ_defvec=m68k4knetbsd_vec
     targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
@@ -976,6 +972,11 @@ case "${targ}" in
     targ_selvecs="mach_o_be_vec mach_o_le_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
     targ_archs="bfd_powerpc_arch bfd_rs6000_arch bfd_i386_arch"
     ;;
+  powerpc-*-lynxos*)
+    targ_defvec=bfd_elf32_powerpc_vec
+    targ_selvecs="rs6000coff_vec"
+    targ_cflags=-DSMALL_ARCHIVE
+    ;;    
   powerpc-*-macos*)
     targ_defvec=pmac_xcoff_vec
     ;;
@@ -1157,10 +1158,6 @@ case "${targ}" in
   sparc-*-linux-gnu*)
     targ_defvec=bfd_elf32_sparc_vec
     targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
-    ;;
-  sparc-*-lynxos*)
-    targ_defvec=sparclynx_coff_vec
-    targ_selvecs=sparclynx_aout_vec
     ;;
   sparc-*-netbsdelf*)
     targ_defvec=bfd_elf32_sparc_vec
Index: gas/configure
===================================================================
RCS file: /cvs/src/src/gas/configure,v
retrieving revision 1.167
diff -u -p -r1.167 configure
--- gas/configure	6 May 2004 02:46:45 -0000	1.167
+++ gas/configure	14 May 2004 00:46:33 -0000
@@ -2636,7 +2636,7 @@ else
 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
-if mkdir -p -- . 2>/dev/null; then
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
   # Keeping the `.' argument allows $(mkdir_p) to be used without
   # argument.  Indeed, we sometimes output rules like
   #   $(mkdir_p) $(somedir)
@@ -2649,7 +2649,7 @@ else
   # recognize any option.  It will interpret all options as
   # directories to create, and then abort because `.' already
   # exists.
-  for d in ./-p ./--;
+  for d in ./-p ./--version;
   do
     test -d $d && rmdir $d
   done
@@ -2990,7 +2990,9 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      : > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
@@ -3018,9 +3020,14 @@ else
        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
-      # (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored.
-      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
         am_cv_CC_dependencies_compiler_type=$depmode
         break
       fi
@@ -3794,7 +3801,7 @@ test x"$pic_mode" = xno && libtool_flags
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 3797 "configure"' > conftest.$ac_ext
+  echo '#line 3804 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -4361,7 +4368,7 @@ for this_target in $target $canon_target
       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 ;;
@@ -4449,7 +4456,6 @@ echo "$as_me: WARNING: GAS support for $
       m68k-*-linux-gnu*)		fmt=elf em=linux ;;
       m68k-*-uclinux*)			fmt=elf ;;
       m68k-*-gnu*)			fmt=elf ;;
-      m68k-*-lynxos*)			fmt=coff em=lynx ;;
       m68k-*-netbsdelf*)		fmt=elf em=nbsd ;;
       m68k-*-netbsd*)			fmt=aout em=nbsd bfd_gas=yes ;;
       m68k-*-openbsd*)			fmt=aout em=nbsd bfd_gas=yes ;;
@@ -4534,6 +4540,7 @@ echo "$as_me: error: Solaris must be con
       ppc-*-netware*)			fmt=elf em=ppcnw ;;
       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 ;;
@@ -4569,7 +4576,6 @@ echo "$as_me: error: Solaris must be con
       sparc-*-coff)			fmt=coff ;;
       sparc-*-linux*aout*)		fmt=aout em=linux ;;
       sparc-*-linux-gnu*)		fmt=elf em=linux ;;
-      sparc-*-lynxos*)			fmt=coff em=lynx ;;
       sparc-fujitsu-none)		fmt=aout ;;
       sparc-*-elf)			fmt=elf ;;
       sparc-*-sysv4*)			fmt=elf ;;
@@ -12352,14 +12358,14 @@ echo X"$mf" |
   grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
   # Extract the definition of DEP_FILES from the Makefile without
   # running `make'.
-  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
   test -z "$DEPDIR" && continue
   # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  U=`sed -n 's/^U = //p' < "$mf"`
   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
   # We invoke sed twice because it is the simplest approach to
   # changing $(DEPDIR) to its actual value in the expansion.
-  for file in `sed -n -e '
+  for file in `sed -n '
     /^DEP_FILES = .*\\\\$/ {
       s/^DEP_FILES = //
       :loop
Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.151
diff -u -p -r1.151 configure.in
--- gas/configure.in	6 May 2004 02:46:45 -0000	1.151
+++ gas/configure.in	14 May 2004 00:46:33 -0000
@@ -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 ;;
@@ -362,7 +362,6 @@ changequote([,])dnl
       m68k-*-linux-gnu*)		fmt=elf em=linux ;;
       m68k-*-uclinux*)			fmt=elf ;;
       m68k-*-gnu*)			fmt=elf ;;
-      m68k-*-lynxos*)			fmt=coff em=lynx ;;
       m68k-*-netbsdelf*)		fmt=elf em=nbsd ;;
       m68k-*-netbsd*)			fmt=aout em=nbsd bfd_gas=yes ;;
       m68k-*-openbsd*)			fmt=aout em=nbsd bfd_gas=yes ;;
@@ -437,6 +436,7 @@ changequote([,])dnl
       ppc-*-netware*)			fmt=elf em=ppcnw ;;
       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 ;;
@@ -472,7 +472,6 @@ changequote([,])dnl
       sparc-*-coff)			fmt=coff ;;
       sparc-*-linux*aout*)		fmt=aout em=linux ;;
       sparc-*-linux-gnu*)		fmt=elf em=linux ;;
-      sparc-*-lynxos*)			fmt=coff em=lynx ;;
       sparc-fujitsu-none)		fmt=aout ;;
       sparc-*-elf)			fmt=elf ;;
       sparc-*-sysv4*)			fmt=elf ;;
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.153
diff -u -p -r1.153 Makefile.am
--- ld/Makefile.am	21 Apr 2004 20:52:26 -0000	1.153
+++ ld/Makefile.am	14 May 2004 00:46:34 -0000
@@ -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/i386l
   $(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)"
Index: ld/Makefile.in
===================================================================
RCS file: /cvs/src/src/ld/Makefile.in,v
retrieving revision 1.165
diff -u -p -r1.165 Makefile.in
--- ld/Makefile.in	21 Apr 2004 20:52:27 -0000	1.165
+++ ld/Makefile.in	14 May 2004 00:46:34 -0000
@@ -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/i386l
   $(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)"
Index: ld/configure.host
===================================================================
RCS file: /cvs/src/src/ld/configure.host,v
retrieving revision 1.35
diff -u -p -r1.35 configure.host
--- ld/configure.host	11 Apr 2004 04:07:46 -0000	1.35
+++ ld/configure.host	14 May 2004 00:46:35 -0000
@@ -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'
@@ -171,11 +166,6 @@ mips*-*-linux-gnu*)
 
 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)
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.147
diff -u -p -r1.147 configure.tgt
--- ld/configure.tgt	11 Apr 2004 04:07:46 -0000	1.147
+++ ld/configure.tgt	14 May 2004 00:46:35 -0000
@@ -74,7 +74,6 @@ sparc*-*-linux-gnu*)	targ_emul=elf32_spa
 			tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
 			tdir_sun4=sparc-sun-sunos4
 			;;
-sparc*-*-lynxos*)	targ_emul=sparclynx ;;
 sparc64-*-netbsd* | sparc64-*-openbsd*)
 			targ_emul=elf64_sparc
 			targ_extra_emuls="elf32_sparc"
@@ -371,7 +370,6 @@ m68k-*-linux-gnu*)	targ_emul=m68kelf
 			;;
 m68k-*-uclinux*)	targ_emul=m68kelf ;;
 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
@@ -534,6 +532,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 ;;
Index: ld/emulparams/i386lynx.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/i386lynx.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 i386lynx.sh
--- ld/emulparams/i386lynx.sh	3 May 1999 07:29:07 -0000	1.1.1.1
+++ ld/emulparams/i386lynx.sh	14 May 2004 00:46:35 -0000
@@ -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=
Index: ld/emulparams/ppclynx.sh
===================================================================
RCS file: ld/emulparams/ppclynx.sh
diff -N ld/emulparams/ppclynx.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld/emulparams/ppclynx.sh	14 May 2004 00:46:35 -0000
@@ -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) }"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]