aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl/armcoff.sc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1999-05-03 07:29:11 +0000
committerRichard Henderson <rth@redhat.com>1999-05-03 07:29:11 +0000
commit252b5132c753830d5fd56823373aed85f2a0db63 (patch)
tree1af963bfd8d3e55167b81def4207f175eaff3a56 /ld/scripttempl/armcoff.sc
downloadgdb-252b5132c753830d5fd56823373aed85f2a0db63.zip
gdb-252b5132c753830d5fd56823373aed85f2a0db63.tar.gz
gdb-252b5132c753830d5fd56823373aed85f2a0db63.tar.bz2
19990502 sourceware importbinu_ss_19990502
Diffstat (limited to 'ld/scripttempl/armcoff.sc')
-rw-r--r--ld/scripttempl/armcoff.sc62
1 files changed, 62 insertions, 0 deletions
diff --git a/ld/scripttempl/armcoff.sc b/ld/scripttempl/armcoff.sc
new file mode 100644
index 0000000..8e07169
--- /dev/null
+++ b/ld/scripttempl/armcoff.sc
@@ -0,0 +1,62 @@
+# 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}
+
+ENTRY(${ENTRY})
+
+SECTIONS
+{
+ /* 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)
+ *(.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 = .;}
+ }
+ .data ${RELOCATING+${DATA_ADDR-0x40000 + (. & 0xfffc0fff)}} : {
+ ${RELOCATING+ __data_start__ = . ;}
+ *(.data)
+ ${RELOCATING+ __data_end__ = . ;}
+ ${RELOCATING+ edata = .;}
+ ${RELOCATING+ _edata = .;}
+ }
+ .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
+ {
+ ${RELOCATING+ __bss_start__ = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ __bss_end__ = . ;}
+ }
+
+ ${RELOCATING+ end = .;}
+ ${RELOCATING+ _end = .;}
+ ${RELOCATING+ __end__ = .;}
+
+ .stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
+ }
+ .stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
+ }
+}
+EOF