From 790147a9e9ee05542c621a36669288413880c876 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 8 Sep 2020 10:01:45 -0700 Subject: [PATCH] Pass --disable-reloc-section on PE targets for PR 25662 test Pass --disable-reloc-section on PE targets for PR 25662 test since commit 514b4e191d5f46de8e142fe216e677a35fa9c4bb Author: Jeremy Drake Date: Thu Aug 27 12:58:27 2020 +0100 Change the default characteristics of DLLs built by the linker to more secure settings. defaulted to --enable-reloc-section. PR ld/26587 * testsuite/binutils-all/objcopy.exp: Pass --disable-reloc-section to ld on PE targets for PR 25662 test. --- binutils/ChangeLog | 6 ++++++ binutils/testsuite/binutils-all/objcopy.exp | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 0c06bcedae0..bd636c9a864 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2020-09-08 H.J. Lu + + PR ld/26587 + * testsuite/binutils-all/objcopy.exp: Pass --disable-reloc-section + to ld on PE targets for PR 25662 test. + 2020-09-08 Jozef Lawrynowicz Kuan-Lin Chen diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index 9877f3d3107..47c3a484144 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -1354,7 +1354,12 @@ if { [istarget pdp11-*-*] } { set src "pr25662.s" } +set ldflags "-T$srcdir/$subdir/pr25662.ld" +if { [istarget *-*-cygwin] || [istarget *-*-mingw*] } { + append ldflags " --disable-reloc-section" +} + #xcoff doesn't support arbitrary sections if { ![is_xcoff_format] } { - objcopy_test "pr25662" $src executable "" "-T$srcdir/$subdir/pr25662.ld" + objcopy_test "pr25662" $src executable "" $ldflags } -- 2.30.2