ld: Pass --no-rosegment to ld in some linker tests
For elf/x86, --rosegment places code after read-only data, instead of
before read-only data. Pass --no-rosegment to ld in some linker tests
to avoid extra linker test failures when binutils is configured with
--enable-rosegment for elf/x86.
binutils/
PR ld/34003
* testsuite/lib/binutils-common.exp (check_rosegment_support): New.
(run_dump_test): Make NO_ROSEGMENT_LDFLAGS global.
ld/
PR ld/34003
* testsuite/config/default.exp (NO_ROSEGMENT_LDFLAGS): New.
* testsuite/ld-elf/mbind1a.d: Pass $NO_ROSEGMENT_LDFLAGS to ld.
* testsuite/ld-elf/pr26256-2b.d: Likewise.
* testsuite/ld-srec/srec.exp (extra_flags): Add
$NO_ROSEGMENT_LDFLAGS.
* testsuite/ld-x86-64/no-plt.exp: Pass -Wl,--no-rosegment to
compiler.
* testsuite/ld-x86-64/pr27491-1c.d: Pass --no-rosegment to ld.
* testsuite/ld-x86-64/pr27491-2.d: Likewise.
* testsuite/ld-x86-64/pr27491-3.d: Likewise.
* testsuite/ld-x86-64/pr27491-4.d: Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
10 files changed