Pass --disable-reloc-section on PE targets for PR 25662 test
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 8 Sep 2020 17:01:45 +0000 (10:01 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 8 Sep 2020 17:01:45 +0000 (10:01 -0700)
Pass --disable-reloc-section on PE targets for PR 25662 test since

commit 514b4e191d5f46de8e142fe216e677a35fa9c4bb

Author: Jeremy Drake <sourceware-bugzilla@jdrake.com>
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
binutils/testsuite/binutils-all/objcopy.exp

index 0c06bcedae092d54a350a61c1162c215bbebf7cd..bd636c9a864e20bee5925d51901b5bc7b9da7ade 100644 (file)
@@ -1,3 +1,9 @@
+2020-09-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+       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  <jozef.l@mittosystems.com>
        Kuan-Lin Chen  <kuanlinchentw@gmail.com>
 
index 9877f3d3107fd7b1f6c34a896f8b1d81744dd621..47c3a48414476cf5c4a710f7e84361e31452396e 100644 (file)
@@ -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
 }