aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog11
-rw-r--r--ld/Makefile.am6
-rw-r--r--ld/Makefile.in6
-rw-r--r--ld/configure.host10
-rw-r--r--ld/configure.tgt1
-rw-r--r--ld/emulparams/i386lynx.sh20
-rw-r--r--ld/emulparams/ppclynx.sh20
7 files changed, 56 insertions, 18 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index fb0159d..b8248ea 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 308d422..b93574c 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 40051ef..e0f5c6d 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 f2e1eb4..4c2af07 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 cd4274c..65f1d76 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 988c175..3235ebe 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 0000000..2534687
--- /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) }"