[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/22696] New: Wrong order of SHLIB_RODATA_ADDR in elf.sc?
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/22696] New: Wrong order of SHLIB_RODATA_ADDR in elf.sc? |
Date: |
Wed, 10 Jan 2018 21:27:29 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22696
Bug ID: 22696
Summary: Wrong order of SHLIB_RODATA_ADDR in elf.sc?
Product: binutils
Version: 2.30 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
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
Shouldn't the order 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
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/22696] New: Wrong order of SHLIB_RODATA_ADDR in elf.sc?,
hjl.tools at gmail dot com <=