diff options
Diffstat (limited to 'ld/scripttempl/sh.sc')
-rw-r--r-- | ld/scripttempl/sh.sc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ld/scripttempl/sh.sc b/ld/scripttempl/sh.sc index 7d1e3db..0a500b3 100644 --- a/ld/scripttempl/sh.sc +++ b/ld/scripttempl/sh.sc @@ -12,7 +12,7 @@ TORS=".tors : ___dtors = . ; *(.dtors) ___dtors_end = . ; - } > ram" + }${RELOCATING+ > ram}" cat <<EOF /* Copyright (C) 2014-2018 Free Software Foundation, Inc. @@ -24,11 +24,17 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(${ARCH}) +EOF + +test -n "${RELOCATING}" && cat <<EOF MEMORY { ram : o = 0x1000, l = 512k } +EOF + +cat <<EOF SECTIONS { .text : |