Update year range in copyright notice of binutils files
[deliverable/binutils-gdb.git] / ld / scripttempl / pe.sc
index f227cb64ba6b98d2329299a65dd13a276044bca5..c8a45ca09d1ba6f3314ce81e4b565cab95a5afcf 100644 (file)
@@ -1,7 +1,7 @@
 # Linker script for PE.
 #
-# Copyright (C) 2014-2016 Free Software Foundation, Inc.
-# 
+# Copyright (C) 2014-2018 Free Software Foundation, Inc.
+#
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
 # notice and this notice are preserved.
@@ -21,13 +21,13 @@ if test "${RELOCATING}"; then
   R_TEXT='*(SORT(.text$*))'
   if test "x$LD_FLAG" = "xauto_import" ; then
     R_DATA='*(SORT(.data$*))
-            *(.rdata)
+           *(.rdata)
            *(SORT(.rdata$*))'
     R_RDATA=''
   else
     R_DATA='*(SORT(.data$*))'
     R_RDATA='*(.rdata)
-             *(SORT(.rdata$*))'
+            *(SORT(.rdata$*))'
   fi
   R_IDATA234='
     KEEP (SORT(*)(.idata$2))
@@ -60,12 +60,17 @@ else
   R_IDATA234=
   R_IDATA5=
   R_IDATA67=
-  R_CRT=
+  R_CRT_XC=
+  R_CRT_XI=
+  R_CRT_XL=
+  R_CRT_XP=
+  R_CRT_XT=
+  R_TLS='*(.tls)'
   R_RSRC='*(.rsrc)'
 fi
 
 cat <<EOF
-/* Copyright (C) 2014-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2014-2018 Free Software Foundation, Inc.
 
    Copying and distribution of this script, with or without modification,
    are permitted in any medium without royalty provided the copyright
@@ -90,18 +95,32 @@ SECTIONS
     ${R_TEXT}
     ${RELOCATING+ *(.text.*)}
     ${RELOCATING+ *(.gnu.linkonce.t.*)}
-    *(.glue_7t)
-    *(.glue_7)
-    ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
-                       LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0); }
-    ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
-                       LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0); }
-    ${RELOCATING+ *(.fini)}
+    ${RELOCATING+*(.glue_7t)}
+    ${RELOCATING+*(.glue_7)}
+    ${CONSTRUCTING+
+       PROVIDE(___CTOR_LIST__ = .);
+       PROVIDE(__CTOR_LIST__ = .);
+       LONG (-1);
+       KEEP(*(.ctors));
+       KEEP(*(.ctor));
+       KEEP(*(SORT_BY_NAME(.ctors.*)));
+       LONG (0);
+     }
+    ${CONSTRUCTING+
+       PROVIDE(___DTOR_LIST__ = .);
+       PROVIDE(__DTOR_LIST__ = .);
+       LONG (-1);
+       KEEP(*(.dtors));
+       KEEP(*(.dtor));
+       KEEP(*(SORT_BY_NAME(.dtors.*)));
+       LONG (0);
+     }
+    ${RELOCATING+ KEEP (*(.fini))}
     /* ??? Why is .gcc_exc here?  */
     ${RELOCATING+ *(.gcc_exc)}
     ${RELOCATING+PROVIDE (etext = .);}
     ${RELOCATING+PROVIDE (_etext = .);}
-    ${RELOCATING+ *(.gcc_except_table)}
+    ${RELOCATING+ KEEP (*(.gcc_except_table))}
   }
 
   /* The Cygwin32 library uses a section to avoid copying certain data
@@ -114,7 +133,7 @@ SECTIONS
   {
     ${RELOCATING+__data_start__ = . ;}
     *(.data)
-    *(.data2)
+    ${RELOCATING+*(.data2)}
     ${R_DATA}
     KEEP(*(.jcr))
     ${RELOCATING+__data_end__ = . ;}
@@ -125,7 +144,7 @@ SECTIONS
   {
     ${R_RDATA}
     ${RELOCATING+__rt_psrelocs_start = .;}
-    *(.rdata_runtime_pseudo_reloc)
+    ${RELOCATING+KEEP(*(.rdata_runtime_pseudo_reloc))}
     ${RELOCATING+__rt_psrelocs_end = .;}
   }
   ${RELOCATING+__rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;}
@@ -136,12 +155,12 @@ SECTIONS
 
   .eh_frame ${RELOCATING+BLOCK(__section_alignment__)} :
   {
-    KEEP(*(.eh_frame*))
+    KEEP(*(.eh_frame${RELOCATING+*}))
   }
 
   .pdata ${RELOCATING+BLOCK(__section_alignment__)} :
   {
-    KEEP(*(.pdata))
+    KEEP(*(.pdata${RELOCATING+*}))
   }
 
   .bss ${RELOCATING+BLOCK(__section_alignment__)} :
@@ -178,7 +197,7 @@ SECTIONS
     ${R_IDATA67}
   }
   .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
-  {                                    
+  {
     ${RELOCATING+___crt_xc_start__ = . ;}
     ${R_CRT_XC}
     ${RELOCATING+___crt_xc_end__ = . ;}
@@ -201,7 +220,7 @@ SECTIONS
      be at the beginning of the section to enable SECREL32 relocations with TLS
      data.  */
   .tls ${RELOCATING+BLOCK(__section_alignment__)} :
-  {                                    
+  {
     ${RELOCATING+___tls_start__ = . ;}
     ${R_TLS}
     ${RELOCATING+___tls_end__ = . ;}
@@ -397,5 +416,15 @@ SECTIONS
   {
     *(.zdebug_types${RELOCATING+ .gnu.linkonce.wt.*})
   }
+
+  /* For Go and Rust.  */
+  .debug_gdb_scripts ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_gdb_scripts)
+  }
+  .zdebug_gdb_scripts ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_gdb_scripts)
+  }
 }
 EOF
This page took 0.026965 seconds and 4 git commands to generate.