Tue Apr 26 17:20:03 1994 Stan Shebs (shebs@andros.cygnus.com)
authorStan Shebs <shebs@codesourcery.com>
Wed, 27 Apr 1994 00:31:11 +0000 (00:31 +0000)
committerStan Shebs <shebs@codesourcery.com>
Wed, 27 Apr 1994 00:31:11 +0000 (00:31 +0000)
* Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use
Lynx-specific script templates.
* configure.in (sparclite*-*-coff): Use coff-sparc.
* emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx.
* emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx.
(ENTRY): Set to __main.
* scripttempl/i386lynx.sc: New file, script for I386 Lynx.
* scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections.
* scripttempl/sparclynx.sc: New file, script for uSparc Lynx.

ld/ChangeLog
ld/Makefile.in
ld/configure.in
ld/emulparams/sparclynx.sh
ld/scripttempl/i386lynx.sc [new file with mode: 0644]
ld/scripttempl/sparclynx.sc [new file with mode: 0644]

index 0db00527bd957e28121ec6516480e1989bd522b1..c6b16c11a112b138ec44f67e2b62041e26418139 100644 (file)
@@ -1,3 +1,15 @@
+Tue Apr 26 17:20:03 1994  Stan Shebs  (shebs@andros.cygnus.com)
+
+       * Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use
+       Lynx-specific script templates.
+       * configure.in (sparclite*-*-coff): Use coff-sparc.
+       * emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx.
+       * emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx.
+       (ENTRY): Set to __main.
+       * scripttempl/i386lynx.sc: New file, script for I386 Lynx.
+       * scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections.
+       * scripttempl/sparclynx.sc: New file, script for uSparc Lynx.
+
 Tue Apr 26 12:41:03 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
 
        * scripttempl/mips.sc: Force _gp and .lit8 to be aligned to a 16
index 64fdab4e3895d22908591df43e457790de6619a8..bb3246be762ca6e36463837aaa65c520f14efbf7 100644 (file)
@@ -342,17 +342,14 @@ em_delta68.c: $(srcdir)/emulparams/delta68.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} delta68
 em_m68klynx.c: $(srcdir)/emulparams/m68klynx.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
+  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68klynx.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} m68klynx
 em_i386coff.c: $(srcdir)/emulparams/i386coff.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} i386coff
 em_i386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
+  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} i386lynx
-em_sparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
-       ${GENSCRIPTS} sparclynx
 em_mipslit.c:  $(srcdir)/emulparams/mipslit.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} mipslit
@@ -383,6 +380,9 @@ em_alpha.c: $(srcdir)/emulparams/alpha.sh \
 em_coff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} coff_sparc
+em_sparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
+  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} sparclynx
 em_elf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32ppc
index b657e8eec9e3d7cbdbf61d2cdc8d19d62927b6ae..14f138b8e7fbea8a279518cdd5d46d94554d8e5f 100644 (file)
@@ -41,6 +41,7 @@ do
 case "${targ}" in
 
   sparc-sun-sunos4*)   ld_target=sun4 ;;
+  sparclite*-*-coff)   ld_target=coff-sparc ;;
   sparclite*-fujitsu-*) ld_target=sun4 ;;
   sparc*-*-aout)       ld_target=sun4 ;;
   sparc*-*-coff)       ld_target=coff-sparc ;;
index dd674135289b12a627a394508356195f55c34480..c85c8d59cc0c03142130240f72bb2223a2d24b77 100644 (file)
@@ -1,7 +1,7 @@
-SCRIPT_NAME=sparccoff
+SCRIPT_NAME=sparclynx
 OUTPUT_FORMAT="coff-sparc-lynx"
 # This is what LynxOS /lib/init1.o wants.
-ENTRY=_main
+ENTRY=__main
 # following are dubious
 PAGE_SIZE=0x1000
 TEXT_START_ADDR=0
diff --git a/ld/scripttempl/i386lynx.sc b/ld/scripttempl/i386lynx.sc
new file mode 100644 (file)
index 0000000..b1bfdb7
--- /dev/null
@@ -0,0 +1,46 @@
+test -z "$ENTRY" && ENTRY=_start
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+${LIB_SEARCH_DIRS}
+
+ENTRY(${ENTRY})
+
+SECTIONS
+{
+  .text ${RELOCATING+ SIZEOF_HEADERS} : {
+    *(.init)
+    *(.text)
+    ${RELOCATING+ etext  =  .;}
+    ${CONSTRUCTING+ __CTOR_LIST__ = .;}
+    ${CONSTRUCTING+ LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)}
+    *(.ctors)
+    ${CONSTRUCTING+ LONG(0)}
+    ${CONSTRUCTING+ __CTOR_END__ = .;}
+    ${CONSTRUCTING+ __DTOR_LIST__ = .;}
+    ${CONSTRUCTING+ LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)}
+    *(.dtors)
+    ${CONSTRUCTING+ LONG(0)}
+    ${CONSTRUCTING+ __DTOR_END__ = .;}
+    *(.fini)
+    ${RELOCATING+ etext  =  .};
+  }
+  .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
+    *(.data)
+    ${RELOCATING+ edata  =  .};
+  }
+  .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
+  {                                    
+    *(.bss)
+    *(COMMON)
+    ${RELOCATING+ end = .};
+  }
+  .stab  . (NOLOAD) : 
+  {
+    [ .stab ]
+  }
+  .stabstr  . (NOLOAD) :
+  {
+    [ .stabstr ]
+  }
+}
+EOF
diff --git a/ld/scripttempl/sparclynx.sc b/ld/scripttempl/sparclynx.sc
new file mode 100644 (file)
index 0000000..d6b02e4
--- /dev/null
@@ -0,0 +1,47 @@
+# Linker script for Sparc LynxOS.
+test -z "$ENTRY" && ENTRY=_start
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+${LIB_SEARCH_DIRS}
+
+ENTRY(${ENTRY})
+
+SECTIONS
+{
+  .text ${RELOCATING+ SIZEOF_HEADERS} : {
+    *(.init)
+    *(.text)
+    ${RELOCATING+ etext  =  .;}
+    ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
+    ${CONSTRUCTING+ LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)}
+    *(.ctors)
+    ${CONSTRUCTING+ LONG(0)}
+    ${CONSTRUCTING+ ___CTOR_END__ = .;}
+    ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
+    ${CONSTRUCTING+ LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)}
+    *(.dtors)
+    ${CONSTRUCTING+ LONG(0)}
+    ${CONSTRUCTING+ ___DTOR_END__ = .;}
+    *(.fini)
+    ${RELOCATING+ etext  =  .};
+  }
+  .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
+    *(.data)
+    ${RELOCATING+ edata  =  .};
+  }
+  .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
+  {                                    
+    *(.bss)
+    *(COMMON)
+    ${RELOCATING+ end = .};
+  }
+  .stab  . (NOLOAD) : 
+  {
+    [ .stab ]
+  }
+  .stabstr  . (NOLOAD) :
+  {
+    [ .stabstr ]
+  }
+}
+EOF