Update year range in copyright notice of all files.
[deliverable/binutils-gdb.git] / ld / scripttempl / armcoff.sc
index daa0e4377e8b44fc2ea898c75f959bcff01285c2..eb265199e93beef042db1270c8406e9c096c5948 100644 (file)
@@ -1,16 +1,41 @@
 # Linker script for ARM COFF.
 # Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
+#
+# Copyright (C) 2014-2017 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.
+
 test -z "$ENTRY" && ENTRY=_start
 if test -z "${DATA_ADDR}"; then
   if test "$LD_FLAG" = "N" || test "$LD_FLAG" = "n"; then
     DATA_ADDR=.
   fi
 fi
+
+# These are substituted in as variables in order to get '}' in a shell
+# conditional expansion.
+CTOR='.ctor : {
+    *(SORT(.ctors.*))
+    *(.ctor)
+  }'
+DTOR='.dtor : {
+    *(SORT(.dtors.*))
+    *(.dtor)
+  }'
+
 cat <<EOF
-OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+   Copying and distribution of this script, with or without modification,
+   are permitted in any medium without royalty provided the copyright
+   notice and this notice are preserved.  */
+
+OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
@@ -20,29 +45,45 @@ SECTIONS
      present): */
   .text ${RELOCATING+ 0x8000} : {
     *(.init)
-    *(.text)
+    *(.text*)
+    *(.glue_7t)
+    *(.glue_7)
+    *(.rdata)
     ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 
                        LONG (-1); *(.ctors); *(.ctor); LONG (0); }
     ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 
                        LONG (-1); *(.dtors); *(.dtor);  LONG (0); }
     *(.fini)
-    ${RELOCATING+ etext  =  .};
+    ${RELOCATING+ etext  =  .;}
+    ${RELOCATING+ _etext =  .;}
   }
-  .data ${RELOCATING+${DATA_ADDR-0x40000 + (. & 0xffc00fff)}} : {
-    __data_start__ = . ;
-    *(.data)
-    __data_end__ = . ;
-    ${RELOCATING+ edata  =  .};
+  .data ${RELOCATING+${DATA_ADDR-0x40000 + (ALIGN(0x8) & 0xfffc0fff)}} : {
+    ${RELOCATING+  __data_start__ = . ;}
+    *(.data*)
+        
+    ${RELOCATING+*(.gcc_exc*)}
+    ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
+    ${RELOCATING+*(.eh_fram*)}
+    ${RELOCATING+___EH_FRAME_END__ = . ;}
+    ${RELOCATING+LONG(0);}
+    
+    ${RELOCATING+ __data_end__ = . ;}
+    ${RELOCATING+ edata  =  .;}
+    ${RELOCATING+ _edata  =  .;}
   }
-  .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
+  ${CONSTRUCTING+${RELOCATING-$CTOR}}
+  ${CONSTRUCTING+${RELOCATING-$DTOR}}
+  .bss ${RELOCATING+ ALIGN(0x8)} :
   {                                    
-    __bss_start__ = . ;
+    ${RELOCATING+ __bss_start__ = . ;}
     *(.bss)
     *(COMMON)
-    __bss_end__ = . ;
+    ${RELOCATING+ __bss_end__ = . ;}
   }
 
-  ${RELOCATING+ __end__ = .};
+  ${RELOCATING+ end = .;}
+  ${RELOCATING+ _end = .;}
+  ${RELOCATING+ __end__ = .;}
 
   .stab  0 ${RELOCATING+(NOLOAD)} : 
   {
This page took 0.02369 seconds and 4 git commands to generate.