Thu Mar 19 14:54:45 1998 Geoffrey Noer <noer@cygnus.com>
authorGeoffrey Noer <noer@cygnus>
Thu, 19 Mar 1998 23:04:54 +0000 (23:04 +0000)
committerGeoffrey Noer <noer@cygnus>
Thu, 19 Mar 1998 23:04:54 +0000 (23:04 +0000)
        * scripttempl/pe.sc: The Cygwin32 library uses a .data$nocopy
        section to avoid copying certain data on fork.  The linker used to
        include this between __data_start__ and __data_end__, but that
        breaks building the cygwin32 dll.  The fix is to rename the
        section ".data_cygwin_nocopy" and explictly include it after
        __data_end__.

ld/ChangeLog
ld/scripttempl/pe.sc

index 9f5ec1488e6a54d049000cfc0ef324ec3708a1ba..2459b4b4f3eb8e45840aa93b4bce4c5c8159a60f 100644 (file)
@@ -1,3 +1,12 @@
+Thu Mar 19 14:54:45 1998  Geoffrey Noer  <noer@cygnus.com>
+
+       * scripttempl/pe.sc: The Cygwin32 library uses a .data$nocopy
+       section to avoid copying certain data on fork.  The linker used to
+       include this between __data_start__ and __data_end__, but that
+       breaks building the cygwin32 dll.  The fix is to rename the
+       section ".data_cygwin_nocopy" and explictly include it after
+       __data_end__.
+
 Wed Mar 18 09:42:24 1998  Nick Clifton  <nickc@cygnus.com>
 
        * configure.tgt (targ_extra_emuls): Add thumb-pe target.
index 6a41aaefe89cfecf77539d0a2594cb1490bcc8ea..c516abd848208313606e7fcb77220f9c680b3e40 100644 (file)
@@ -1,7 +1,13 @@
 # Linker script for PE.
 
+if test -z "${RELOCATEABLE_OUTPUT_FORMAT}"; then
+  RELOCATEABLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
+fi
+
 cat <<EOF
-OUTPUT_FORMAT(${OUTPUT_FORMAT})
+${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
+${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
+
 ${LIB_SEARCH_DIRS}
 
 ENTRY(_mainCRTStartup)
@@ -12,6 +18,7 @@ SECTIONS
   {
     ${RELOCATING+ *(.init)}
     *(.text)
+    ${RELOCATING+*(.text\$*)}
     ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 
                        LONG (-1); *(.ctors); *(.ctor); LONG (0); }
     ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 
@@ -20,44 +27,40 @@ SECTIONS
     /* ??? Why is .gcc_exc here?  */
     ${RELOCATING+ *(.gcc_exc)}
     ${RELOCATING+ etext = .;}
-    /* Grouped section support currently must be explicitly provided for
-       in the linker script.  */
-    *(.text\$)
     *(.gcc_except_table)
   }
 
-  .bss BLOCK(__section_alignment__)  :
-  {
-    __bss_start__ = . ;
-    *(.bss)
-    *(COMMON)
-    __bss_end__ = . ;
-  }
-  .data BLOCK(__section_alignment__) : 
+  .data ${RELOCATING+BLOCK(__section_alignment__)} : 
   {
-    __data_start__ = . ; 
+    ${RELOCATING+__data_start__ = . ;}
     *(.data)
     *(.data2)
-    __data_end__ = . ; 
-    /* Grouped section support currently must be explicitly provided for
-       in the linker script.  */
-    *(.data\$)
+    ${RELOCATING+*(.data\$*)}
+    ${RELOCATING+__data_end__ = . ;}
+    ${RELOCATING+*(.data_cygwin_nocopy)}
+  }
+
+  .bss ${RELOCATING+BLOCK(__section_alignment__)} :
+  {
+    ${RELOCATING+__bss_start__ = . ;}
+    *(.bss)
+    *(COMMON)
+    ${RELOCATING+__bss_end__ = . ;}
   }
 
-  .rdata BLOCK(__section_alignment__) :
+  .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
   {
     *(.rdata)
-    /* Grouped section support currently must be explicitly provided for
-       in the linker script.  */
-    *(.rdata\$)
+    ${RELOCATING+*(.rdata\$*)}
+    *(.eh_frame)
   }
 
-  .edata BLOCK(__section_alignment__) :
+  .edata ${RELOCATING+BLOCK(__section_alignment__)} :
   {
     *(.edata)
   }
 
-  /DISCARD/ BLOCK(__section_alignment__) :
+  /DISCARD/ :
   {
     *(.debug\$S)
     *(.debug\$T)
@@ -65,7 +68,7 @@ SECTIONS
     *(.drectve)
   }
 
-  .idata BLOCK(__section_alignment__) :
+  .idata ${RELOCATING+BLOCK(__section_alignment__)} :
   {
     /* This cannot currently be handled with grouped sections.
        See pe.em:sort_sections.  */
@@ -78,37 +81,35 @@ SECTIONS
     *(.idata\$6)
     *(.idata\$7)
   }
-  .CRT BLOCK(__section_alignment__) :
+  .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
   {                                    
-    /* Grouped sections are used to handle .CRT\$foo.  */
-    *(.CRT\$)
+    ${RELOCATING+*(.CRT\$*)}
   }
 
-  .endjunk BLOCK(__section_alignment__) :
+  .endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
   {
     /* end is deprecated, don't use it */
     ${RELOCATING+ end = .;}
     ${RELOCATING+ __end__ = .;}
   }
 
-  .reloc BLOCK(__section_alignment__) :
+  .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
   {                                    
     *(.reloc)
   }
 
-  .rsrc BLOCK(__section_alignment__) :
+  .rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
   {                                    
     *(.rsrc)
-    /* Grouped sections are used to handle .rsrc\$0[12].  */
-    *(.rsrc\$)
+    ${RELOCATING+*(.rsrc\$*)}
   }
 
-  .stab BLOCK(__section_alignment__)  ${RELOCATING+(NOLOAD)} : 
+  .stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
   {
     [ .stab ]
   }
 
-  .stabstr BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
+  .stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
   {
     [ .stabstr ]
   }
This page took 0.050233 seconds and 4 git commands to generate.