diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-01-11 05:05:25 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-01-11 05:05:25 -0800 |
commit | 6bd0a312a4cb6803b9d6aa2f5646b610d213a1fe (patch) | |
tree | ea7535fb3d4be906755197de30d65590d23b2cac /ld/scripttempl | |
parent | 754452f07e701448e5d9bd004cb108ddc48a8d67 (diff) | |
download | gdb-6bd0a312a4cb6803b9d6aa2f5646b610d213a1fe.zip gdb-6bd0a312a4cb6803b9d6aa2f5646b610d213a1fe.tar.gz gdb-6bd0a312a4cb6803b9d6aa2f5646b610d213a1fe.tar.bz2 |
Fix the order of SHLIB_RODATA_ADDR in elf.sc
elf.sc has
if test -n "${RODATA_ADDR}"; then
RODATA_ADDR="\
SEGMENT_START(\"rodata-segment\", ${RODATA_ADDR}) + SIZEOF_HEADERS"
else
RODATA_ADDR="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
^^^^^^^^^^ Set RODATA_ADDR
RODATA_ADDR="SEGMENT_START(\"rodata-segment\", ${RODATA_ADDR})"
^^^^^^^^^^ Set RODATA_ADDR with ${RODATA_ADDR}
fi
if test -n "${SHLIB_RODATA_ADDR}"; then
SHLIB_RODATA_ADDR="\
SEGMENT_START(\"rodata-segment\", ${SHLIB_RODATA_ADDR}) + SIZEOF_HEADERS"
else
SHLIB_RODATA_ADDR="SEGMENT_START(\"rodata-segment\", ${SHLIB_RODATA_ADDR})"
^^^^^^^^^^ Set SHLIB_RODATA_ADDR
SHLIB_RODATA_ADDR="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
^^^^^^^^^^ Override SHLIB_RODATA_ADDR
fi
The order should be:
if test -n "${SHLIB_RODATA_ADDR}"; then
SHLIB_RODATA_ADDR="\
SEGMENT_START(\"rodata-segment\", ${SHLIB_RODATA_ADDR}) + SIZEOF_HEADERS"
else
SHLIB_RODATA_ADDR="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
SHLIB_RODATA_ADDR="SEGMENT_START(\"rodata-segment\", ${SHLIB_RODATA_ADDR})"
fi
PR ld/22696
* scripttempl/elf.sc: Fix the order of SHLIB_RODATA_ADDR.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/elf.sc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 841a831..3de86b0 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -522,8 +522,8 @@ SEGMENT_START(\"rodata-segment\", ${RODATA_ADDR}) + SIZEOF_HEADERS" SHLIB_RODATA_ADDR="\ SEGMENT_START(\"rodata-segment\", ${SHLIB_RODATA_ADDR}) + SIZEOF_HEADERS" else - SHLIB_RODATA_ADDR="SEGMENT_START(\"rodata-segment\", ${SHLIB_RODATA_ADDR})" SHLIB_RODATA_ADDR="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))" + SHLIB_RODATA_ADDR="SEGMENT_START(\"rodata-segment\", ${SHLIB_RODATA_ADDR})" fi cat <<EOF /* Adjust the address for the rodata segment. We want to adjust up to |