diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-12-01 04:27:28 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-12-01 04:27:41 -0800 |
commit | 3ed3c10425a699c7884dbdbf865ad3766822ea07 (patch) | |
tree | d54e4cd103ccc57f8213c2894afe60501e07ed20 /ld/scripttempl | |
parent | 54e75f291ef10f2ccb0549b25e0d9d207b325c79 (diff) | |
download | gdb-3ed3c10425a699c7884dbdbf865ad3766822ea07.zip gdb-3ed3c10425a699c7884dbdbf865ad3766822ea07.tar.gz gdb-3ed3c10425a699c7884dbdbf865ad3766822ea07.tar.bz2 |
arc: Enable -Ttext-segment
Define TEXT_START_ADDR and SHLIB_TEXT_START_ADDR with SEGMENT_START to
enable -Ttext-segment.
PR ld/26970
* scripttempl/elfarc.sc (TEXT_START_ADDR): New. Add SEGMENT_START.
(SHLIB_TEXT_START_ADDR): Likewise.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/elfarc.sc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/scripttempl/elfarc.sc b/ld/scripttempl/elfarc.sc index ebf40b8..3bb0c2f 100644 --- a/ld/scripttempl/elfarc.sc +++ b/ld/scripttempl/elfarc.sc @@ -172,6 +172,9 @@ STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} : *(.stack) }" +TEXT_START_ADDR="SEGMENT_START(\"text-segment\", ${TEXT_START_ADDR})" +SHLIB_TEXT_START_ADDR="SEGMENT_START(\"text-segment\", ${SHLIB_TEXT_START_ADDR:-0})" + # if this is for an embedded system, don't add SIZEOF_HEADERS. if [ -z "$EMBEDDED" ]; then test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS" |