* scripttempl/armcoff.sc: For -N or -n, don't align .data. From
authorIan Lance Taylor <ian@airs.com>
Mon, 16 Sep 1996 21:56:33 +0000 (21:56 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 16 Sep 1996 21:56:33 +0000 (21:56 +0000)
  Chris Hadley <Christopher.Hadley@cl.cam.ac.uk>

ld/ChangeLog
ld/scripttempl/armcoff.sc

index 29a057f05cfa82c3c8a004f85f38ad8f9faafd2d..96993e2f1abd38640ea08495237d41db6ba0993c 100644 (file)
@@ -1,3 +1,8 @@
+Mon Sep 16 17:55:21 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       * scripttempl/armcoff.sc: For -N or -n, don't align .data.  From
+       Chris Hadley <Christopher.Hadley@cl.cam.ac.uk>
+
 start-sanitize-v850
 Sun Sep 15 22:09:56 1996  Jeffrey A Law  (law@cygnus.com)
 
index 8243716449cf0df751e852e099314a44baf99d9d..daa0e4377e8b44fc2ea898c75f959bcff01285c2 100644 (file)
@@ -1,6 +1,11 @@
 # Linker script for ARM COFF.
 # Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
 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
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
@@ -9,22 +14,36 @@ ENTRY(${ENTRY})
 
 SECTIONS
 {
-  .text ${RELOCATING+ SIZEOF_HEADERS} : {
+  /* We start at 0x8000 because gdb assumes it (see FRAME_CHAIN).
+     This is an artifact of the ARM Demon monitor using the bottom 32k
+     as workspace (shared with the FP instruction emulator if
+     present): */
+  .text ${RELOCATING+ 0x8000} : {
     *(.init)
     *(.text)
+    ${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  =  .};
   }
-  .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
+  .data ${RELOCATING+${DATA_ADDR-0x40000 + (. & 0xffc00fff)}} : {
+    __data_start__ = . ;
     *(.data)
+    __data_end__ = . ;
     ${RELOCATING+ edata  =  .};
   }
   .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
   {                                    
+    __bss_start__ = . ;
     *(.bss)
     *(COMMON)
-    ${RELOCATING+ end = .};
+    __bss_end__ = . ;
   }
+
+  ${RELOCATING+ __end__ = .};
+
   .stab  0 ${RELOCATING+(NOLOAD)} : 
   {
     [ .stab ]
This page took 0.030647 seconds and 4 git commands to generate.