Wed Feb 14 16:38:36 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
authorIan Lance Taylor <ian@airs.com>
Wed, 14 Feb 1996 21:43:54 +0000 (21:43 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 14 Feb 1996 21:43:54 +0000 (21:43 +0000)
* 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.

ld/ChangeLog
ld/Makefile.in
ld/configure.tgt
ld/emulparams/.Sanitize
ld/emulparams/m68kpsos.sh [new file with mode: 0644]
ld/ldlang.c
ld/scripttempl/.Sanitize
ld/scripttempl/psos.sc [new file with mode: 0644]

index 81c80daba096d97c692a13aa9d12840c6d3eaee0..d8f1846b0f4543ad1fbb421f53807c834b115b81 100644 (file)
@@ -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
index 75c8d9a2a1f7a05e7eb3605ffe4fa16eebcae807..0255cc984be83e22aef829d064cc2286df3977dd 100644 (file)
@@ -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
index 6a1451961c7493c4becc526608df1068132e3b4b..0712fee9d2cc1c4450bdf6c2166d7427082e1a1e 100644 (file)
@@ -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 ;;
index 84dd7d59e8898f752a7e8f0b7863d61afd46caa0..a49c3852e97b5f201951dae419d9fea73d2c8b38 100644 (file)
@@ -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 (file)
index 0000000..34eb8ca
--- /dev/null
@@ -0,0 +1,6 @@
+SCRIPT_NAME=psos
+OUTPUT_FORMAT="elf32-m68k"
+TEXT_START_ADDR=0x20000
+MAXPAGESIZE=0x1000
+ARCH=m68k
+TEMPLATE_NAME=elf32
index 36d3d7732a3d524df5b0c9deaac3e91a76fa252b..4dedd9886ff8ff361c7c4b4fb1e034cc4e3015ac 100644 (file)
@@ -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;
index 71b8a5979308a6a855a5f64bd170b3f09fd2ab28..f05fd2738783fc40e65d0ccc4bac2306ace19f22 100644 (file)
@@ -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 (file)
index 0000000..ab8c6c7
--- /dev/null
@@ -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