- Update to binutils 2.39: * The ELF linker will now generate a warning message if the stack is made executable. Similarly it will warn if the output binary contains a segment with all three of the read, write and execute permission bits set. These warnings are intended to help developers identify programs which might be vulnerable to attack via these executable memory regions. The warnings are enabled by default but can be disabled via a command line option. It is also possible to build a linker with the warnings disabled, should that be necessary. * The ELF linker now supports a --package-metadata option that allows embedding a JSON payload in accordance to the Package Metadata specification. * In linker scripts it is now possible to use TYPE=<type> in an output section description to set the section type value. * The objdump program now supports coloured/colored syntax highlighting of its disassembler output for some architectures. (Currently: AVR, RiscV, s390, x86, x86_64). * The nm program now supports a --no-weak/-W option to make it ignore weak symbols. * The readelf and objdump programs now support a -wE option to prevent them from attempting to access debuginfod servers when following links. * The objcopy program's --weaken, --weaken-symbol, and --weaken-symbols options now works with unique symbols as well. - Rebase binutils-compat-old-behaviour.diff, binutils-revert-hlasm-insns.diff, binutils-revert-plt32-in-branches.diff and remove binutils-2.38-branch.diff.gz. - For now use --disable-gprofng. - Includes fixes for these CVEs: bnc#1142579 aka CVE-2019-1010204 aka PR23765 OBS-URL: https://build.opensuse.org/request/show/993443 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=413
64 lines
2.7 KiB
Diff
64 lines
2.7 KiB
Diff
This adjusts some testcases that expect new behaviour:
|
|
* that relaxable relocations are generated
|
|
* that separate-code is default
|
|
- this also implies that default max-page-size is 0x1000, instead of the
|
|
old 0x200000, so some testcases need to encode that as well
|
|
diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp
|
|
index 2e0cbd37f17..fcd3dd920e4 100644
|
|
--- a/ld/testsuite/ld-elf/linux-x86.exp
|
|
+++ b/ld/testsuite/ld-elf/linux-x86.exp
|
|
@@ -275,7 +275,7 @@ proc check_pr25749a {testname srcfilea srcfileb cflags ldflags lderror} {
|
|
}
|
|
|
|
# Suppress warning for unsupported attribute from older GCC.
|
|
- append cflags " -w"
|
|
+ append cflags " -w -Wa,-mrelax-relocations=yes"
|
|
|
|
exec cp $srcdir/$subdir/$srcfilea $srcfilea
|
|
exec chmod +w $srcfilea
|
|
@@ -396,7 +396,7 @@ proc check_pr25749b {testname srcfilea srcfileb cflags ldflags dsoldflags args}
|
|
[list \
|
|
"Build lib${testname}.so ($dsoldflags)" \
|
|
"-shared $dsoldflags tmpdir/pr25749-bin.o -z noexecstack" \
|
|
- "-fPIC -I../bfd" \
|
|
+ "-fPIC -I../bfd -Wa,-mrelax-relocations=yes" \
|
|
[list $srcfileb] \
|
|
{{readelf {-Wr} pr25749.rd}} \
|
|
"lib${testname}.so" \
|
|
diff --git a/ld/testsuite/ld-i386/report-reloc-1.d b/ld/testsuite/ld-i386/report-reloc-1.d
|
|
index 162161592a1..ee96047043d 100644
|
|
--- a/ld/testsuite/ld-i386/report-reloc-1.d
|
|
+++ b/ld/testsuite/ld-i386/report-reloc-1.d
|
|
@@ -1,6 +1,6 @@
|
|
#source: report-reloc-1.s
|
|
#as: --32
|
|
-#ld: -pie -melf_i386 -z report-relative-reloc $NO_DT_RELR_LDFLAGS
|
|
+#ld: -pie -melf_i386 -z report-relative-reloc -z separate-code $NO_DT_RELR_LDFLAGS
|
|
#warning_output: report-reloc-1.l
|
|
#readelf: -r --wide
|
|
|
|
diff --git a/ld/testsuite/ld-x86-64/report-reloc-1-x32.d b/ld/testsuite/ld-x86-64/report-reloc-1-x32.d
|
|
index 63fe7b1bb8a..29a94ff8762 100644
|
|
--- a/ld/testsuite/ld-x86-64/report-reloc-1-x32.d
|
|
+++ b/ld/testsuite/ld-x86-64/report-reloc-1-x32.d
|
|
@@ -1,6 +1,6 @@
|
|
#source: report-reloc-1.s
|
|
#as: --x32
|
|
-#ld: -pie -melf32_x86_64 -z report-relative-reloc $NO_DT_RELR_LDFLAGS
|
|
+#ld: -pie -melf32_x86_64 -z report-relative-reloc -z separate-code -z max-page-size=4096 $NO_DT_RELR_LDFLAGS
|
|
#warning_output: report-reloc-1.l
|
|
#readelf: -r --wide
|
|
|
|
diff --git a/ld/testsuite/ld-x86-64/report-reloc-1.d b/ld/testsuite/ld-x86-64/report-reloc-1.d
|
|
index 69f164c9434..63079acc98a 100644
|
|
--- a/ld/testsuite/ld-x86-64/report-reloc-1.d
|
|
+++ b/ld/testsuite/ld-x86-64/report-reloc-1.d
|
|
@@ -1,6 +1,6 @@
|
|
#source: report-reloc-1.s
|
|
#as: --64
|
|
-#ld: -pie -melf_x86_64 -z report-relative-reloc $NO_DT_RELR_LDFLAGS
|
|
+#ld: -pie -melf_x86_64 -z report-relative-reloc -z separate-code -z max-page-size=4096 $NO_DT_RELR_LDFLAGS
|
|
#warning_output: report-reloc-1.l
|
|
#readelf: -r --wide
|
|
|