From: H.J. Lu Date: Tue, 1 Dec 2020 12:27:28 +0000 (-0800) Subject: arc: Enable -Ttext-segment X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ed3c10425a699c7884dbdbf865ad3766822ea07;p=binutils-gdb.git 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. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 73d0a98b94d..5b26496efcf 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2020-12-01 H.J. Lu + + PR ld/26970 + * scripttempl/elfarc.sc (TEXT_START_ADDR): New. Add SEGMENT_START. + (SHLIB_TEXT_START_ADDR): Likewise. + 2020-12-01 Alan Modra * testsuite/ld-elf/elf.exp: Set ASFLAGS for tic6x. diff --git a/ld/scripttempl/elfarc.sc b/ld/scripttempl/elfarc.sc index ebf40b84528..3bb0c2f9c7c 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"