aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-02-14 21:43:54 +0000
committerIan Lance Taylor <ian@airs.com>1996-02-14 21:43:54 +0000
commit307585f1c9b3e8d0d449e938293a855543e0465b (patch)
tree30847e49c1761523a1d7a56f490328d06d1dac50
parent2b37714adfd20b6cb3c0ff396a85435e7bd6c7c4 (diff)
downloadgdb-307585f1c9b3e8d0d449e938293a855543e0465b.zip
gdb-307585f1c9b3e8d0d449e938293a855543e0465b.tar.gz
gdb-307585f1c9b3e8d0d449e938293a855543e0465b.tar.bz2
Wed Feb 14 16:38:36 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
* ldlang.c (lang_set_startof): Don't do anything for a relocateable link. * ldgram.y (mri_script_file): Call mri_draw_tree. * mri.c (mri_draw_tree): Make globally visible. Don't bother to create memory regions. (mri_load): Don't call mri_draw_tree. * mri.h (mri_draw_tree): Declare. * configure.tgt (m68*-*-psos): New target. * emulparams/m68kpsos.sh: New file. * scripttempl/psos.sc: New file. * Makefile.in (ALL_EMULATIONS): Add em68kpsos.o. (em68kpsos.c): New target.
-rw-r--r--ld/ChangeLog17
-rw-r--r--ld/Makefile.in5
-rw-r--r--ld/configure.tgt4
-rw-r--r--ld/emulparams/.Sanitize1
-rw-r--r--ld/emulparams/m68kpsos.sh6
-rw-r--r--ld/ldlang.c5
-rw-r--r--ld/scripttempl/.Sanitize1
-rw-r--r--ld/scripttempl/psos.sc61
8 files changed, 97 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 81c80da..d8f1846 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,20 @@
+Wed Feb 14 16:38:36 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
+
+ * ldlang.c (lang_set_startof): Don't do anything for a
+ relocateable link.
+
+ * ldgram.y (mri_script_file): Call mri_draw_tree.
+ * mri.c (mri_draw_tree): Make globally visible. Don't bother to
+ create memory regions.
+ (mri_load): Don't call mri_draw_tree.
+ * mri.h (mri_draw_tree): Declare.
+
+ * configure.tgt (m68*-*-psos): New target.
+ * emulparams/m68kpsos.sh: New file.
+ * scripttempl/psos.sc: New file.
+ * Makefile.in (ALL_EMULATIONS): Add em68kpsos.o.
+ (em68kpsos.c): New target.
+
Wed Feb 14 11:09:25 1996 Ian Lance Taylor <ian@cygnus.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Strip
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 75c8d9a..0255cc9 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -205,7 +205,7 @@ ALL_EMULATIONS = ea29k.o ealpha.o earmaoutl.o earmaoutb.o \
eppcnw.o eriscix.o esa29200.o eshl.o esh.o esparclynx.o esparcnbsd.o \
est2000.o esun3.o esun4.o evanilla.o evax.o evsta.o \
ez8001.o ez8002.o ei386pe.o earmpe.o eelf32b4300.o eelf32l4300.o \
- eaixppc.o eaixrs6.o eppcmacos.o edelta68.o eppcpe.o
+ eaixppc.o eaixrs6.o eppcmacos.o edelta68.o eppcpe.o em68kpsos.o
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
@@ -485,6 +485,9 @@ em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68knbsd
+em68kpsos.c: $(srcdir)/emulparams/m68kpsos.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68kpsos
ens32knbsd.c: $(srcdir)/emulparams/ns32knbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} ns32knbsd
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 6a14519..0712fee 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -64,7 +64,7 @@ i[345]86-*-msdos*) targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
i[345]86-*-moss*) targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
i[345]86-*-winnt) targ_emul=i386pe ;;
i[345]86-*-pe) targ_emul=i386pe ;;
-i[345]86-*-win32) targ_emul=i386pe ;;
+i[345]86-*-cygwin32) targ_emul=i386pe ;;
m8*-*-*) targ_emul=m88kbcs ;;
a29k-*-udi) targ_emul=sa29200 ;;
a29k-*-ebmon) targ_emul=ebmon29k ;;
@@ -91,6 +91,7 @@ m68*-*-hpux*) targ_emul=hp3hpux ;;
m68*-*-lynxos*) targ_emul=m68klynx ;;
m68*-hp*-netbsd*) targ_emul=m68k4knbsd ;;
m68*-*-netbsd*) targ_emul=m68knbsd ;;
+m68*-*-psos*) targ_emul=m68kpsos ;;
hppa*-*-*elf*) targ_emul=hppaelf ;;
hppa*-*-lites*) targ_emul=hppaelf ;;
vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
@@ -118,6 +119,7 @@ powerpc-*-macos*) targ_emul=ppcmacos ;;
powerpc-*-netware*) targ_emul=ppcnw ;;
powerpcle-*-pe) targ_emul=ppcpe ;;
powerpcle-*-winnt*) targ_emul=ppcpe ;;
+powerpcle-*-cygwin32) targ_emul=ppcpe ;;
powerpc-*-aix*) targ_emul=aixppc ;;
rs6000-*-aix*) targ_emul=aixrs6 ;;
w65-*-*) targ_emul=w65 ;;
diff --git a/ld/emulparams/.Sanitize b/ld/emulparams/.Sanitize
index 84dd7d5..a49c385 100644
--- a/ld/emulparams/.Sanitize
+++ b/ld/emulparams/.Sanitize
@@ -93,6 +93,7 @@ m68kcoff.sh
m68kelf.sh
m68klynx.sh
m68knbsd.sh
+m68kpsos.sh
m88kbcs.sh
mipsbig.sh
mipsbsd.sh
diff --git a/ld/emulparams/m68kpsos.sh b/ld/emulparams/m68kpsos.sh
new file mode 100644
index 0000000..34eb8ca
--- /dev/null
+++ b/ld/emulparams/m68kpsos.sh
@@ -0,0 +1,6 @@
+SCRIPT_NAME=psos
+OUTPUT_FORMAT="elf32-m68k"
+TEXT_START_ADDR=0x20000
+MAXPAGESIZE=0x1000
+ARCH=m68k
+TEMPLATE_NAME=elf32
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 36d3d77..4dedd98 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -1,5 +1,5 @@
/* Linker command language support.
- Copyright (C) 1991, 92, 93, 94, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -2249,6 +2249,9 @@ lang_set_startof ()
{
asection *s;
+ if (link_info.relocateable)
+ return;
+
for (s = output_bfd->sections; s != NULL; s = s->next)
{
const char *secname;
diff --git a/ld/scripttempl/.Sanitize b/ld/scripttempl/.Sanitize
index 71b8a59..f05fd27 100644
--- a/ld/scripttempl/.Sanitize
+++ b/ld/scripttempl/.Sanitize
@@ -66,6 +66,7 @@ mipsbsd.sc
nw.sc
pe.sc
ppcpe.sc
+psos.sc
riscix.sc
sa29200.sc
sh.sc
diff --git a/ld/scripttempl/psos.sc b/ld/scripttempl/psos.sc
new file mode 100644
index 0000000..ab8c6c7
--- /dev/null
+++ b/ld/scripttempl/psos.sc
@@ -0,0 +1,61 @@
+cat <<EOF
+OUTPUT_FORMAT(${OUTPUT_FORMAT})
+OUTPUT_ARCH(${ARCH})
+${RELOCATING+${LIB_SEARCH_DIRS}}
+
+SECTIONS
+{
+ .text ${RELOCATING:-0} ${RELOCATING+${TEXT_START_ADDR}} : {
+ ${RELOCATING+ start = DEFINED(_START) ? _START : DEFINED(_start) ? _start : .;}
+ ${RELOCATING+ PROVIDE(__text = .);}
+ *(.text);
+ *(code);
+ *(const);
+ *(strings);
+ *(pSOS);
+ *(pROBE);
+ *(pNA);
+ *(pHILE);
+ *(pREPC);
+ *(pRPC);
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
+ ${CONSTRUCTING+ LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)}
+ ${CONSTRUCTING+ *(.ctors)}
+ ${CONSTRUCTING+ LONG(0);}
+ ${CONSTRUCTING+ ___CTOR_END__ = .;}
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
+ ${CONSTRUCTING+ LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2);}
+ ${CONSTRUCTING+ *(.dtors);}
+ ${CONSTRUCTING+ LONG(0);}
+ ${CONSTRUCTING+ ___DTOR_END__ = .;}
+ ${RELOCATING+ PROVIDE(__etext = .);}
+ ${RELOCATING+ PROVIDE(_etext = .);}
+ }
+ .data ${RELOCATING:-0} : ${RELOCATING+ AT(ADDR(.text) + SIZEOF(.text))} {
+ ${RELOCATING+ PROVIDE(__data = .);}
+ *(.data);
+ *(vars);
+ ${RELOCATING+ PROVIDE(__edata = .);}
+ ${RELOCATING+ PROVIDE(_edata = .);}
+ }
+ .bss ${RELOCATING:-0} :
+ {
+ ${RELOCATING+ PROVIDE(__bss = .);}
+ *(.bss);
+ *(zerovars);
+ *(COMMON);
+ ${RELOCATING+ PROVIDE(__ebss = .);}
+ ${RELOCATING+ PROVIDE(__end = .);}
+ ${RELOCATING+ PROVIDE(_end = .);}
+ ${RELOCATING+ PROVIDE(_FreeMemStart = .);}
+ }
+ .stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ *(.stab);
+ }
+ .stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ *(.stabstr);
+ }
+}
+EOF