+1999-10-07  Geoffrey Keating  <geoffk@cygnus.com>
+
+       * scripttempl/elf.sc (.rel.sdata): Combine all the sdata relocs
+       being .rel.sdata, .rel.sdata.*, .rel.gnu.linkonce.s*.
+       (.rela.sdata): Likewise for .rela.sdata.* and .rela.gnu.linkonce.s*.
+       (.rel.sbss): Make like .rel.bss.
+       (.rela.sbss): Make like .rel.bss.
+       (.sdata): Don't include .gnu.linkonce.s.* or .sdata.* when
+       ld -r.
+       (.sbss): Do the same things as for .bss: include SDATA_START_SYMBOLS,
+       .dynsbss.
+
 1999-09-29  Andrew Haley  <aph@cygnus.com>
 
        * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Defer
 
   .rel.got     ${RELOCATING-0} : { *(.rel.got)         }
   .rela.got    ${RELOCATING-0} : { *(.rela.got)                }
   ${OTHER_GOT_RELOC_SECTIONS}
+  .rel.sdata   ${RELOCATING-0} :
+    {
+      *(.rel.sdata)
+      ${RELOCATING+*(.rel.sdata.*)}
+      ${RELOCATING+*(.rel.gnu.linkonce.s*)}
+    }
+  .rela.sdata   ${RELOCATING-0} :
+    {
+      *(.rela.sdata)
+      ${RELOCATING+*(.rela.sdata.*)}
+      ${RELOCATING+*(.rela.gnu.linkonce.s*)}
+    }
+  .rel.sbss    ${RELOCATING-0} : { *(.rel.sbss)                }
+  .rela.sbss   ${RELOCATING-0} : { *(.rela.sbss)       }
   .rel.bss     ${RELOCATING-0} : { *(.rel.bss)         }
   .rela.bss    ${RELOCATING-0} : { *(.rela.bss)                }
   .rel.plt     ${RELOCATING-0} : { *(.rel.plt)         }
   /* We want the small data sections together, so single-instruction offsets
      can access them all, and initialized data all before uninitialized, so
      we can shorten the on-disk segment size.  */
-  .sdata   ${RELOCATING-0} : { *(.sdata) *(.sdata.*) *(.gnu.linkonce.s.*) }
+  .sdata   ${RELOCATING-0} : 
+  {
+    ${RELOCATING+${SDATA_START_SYMBOLS}}
+    *(.sdata) 
+    ${RELOCATING+*(.sdata.*)}
+    ${RELOCATING+*(.gnu.linkonce.s.*)}
+  }
   ${RELOCATING+${OTHER_GOT_SECTIONS}}
   ${RELOCATING+_edata = .;}
   ${RELOCATING+PROVIDE (edata = .);}
   ${RELOCATING+${OTHER_BSS_SYMBOLS}}
   .sbss    ${RELOCATING-0} :
   {
-   *(.sbss) *(.scommon)
-   ${RELOCATING+*(.sbss.*)}
+    *(.dynsbss)
+    *(.sbss)
+    ${RELOCATING+*(.sbss.*)}
+    *(.scommon)
   }
   .bss     ${RELOCATING-0} :
   {