diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-09-16 21:56:33 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-09-16 21:56:33 +0000 |
commit | df6b92ed1b325da2b457f17bcaf8afd010916fe4 (patch) | |
tree | 5407d979f7bee091af4d42097c3f984e347661f4 /ld/scripttempl/armcoff.sc | |
parent | 81530f93ef01e2788b9358f4092931c918ba4d4d (diff) | |
download | gdb-df6b92ed1b325da2b457f17bcaf8afd010916fe4.zip gdb-df6b92ed1b325da2b457f17bcaf8afd010916fe4.tar.gz gdb-df6b92ed1b325da2b457f17bcaf8afd010916fe4.tar.bz2 |
* scripttempl/armcoff.sc: For -N or -n, don't align .data. From
Chris Hadley <Christopher.Hadley@cl.cam.ac.uk>
Diffstat (limited to 'ld/scripttempl/armcoff.sc')
-rw-r--r-- | ld/scripttempl/armcoff.sc | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/ld/scripttempl/armcoff.sc b/ld/scripttempl/armcoff.sc index 8243716..daa0e43 100644 --- a/ld/scripttempl/armcoff.sc +++ b/ld/scripttempl/armcoff.sc @@ -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 ] |