Put sections in a monotonically increasing order of file offset.

Allow ARM and AArch64 targets to have relro on by default.
Add missing test files to lto patch.
This commit is contained in:
Nick Clifton 2016-08-19 12:24:06 +01:00
parent 8d06b5d1c4
commit a243f6a308
4 changed files with 2181 additions and 2 deletions

View File

@ -2504,3 +2504,53 @@ diff -rup binutils-2.26.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.26/ld/tes
run_cc_link_tests $lto_link_symbol_tests
--- /dev/null 2016-08-19 08:03:37.292222041 +0100
+++ binutils-2.27/ld/testsuite/ld-plugin/lto-4a.c 2016-08-19 12:14:15.685818046 +0100
@@ -0,0 +1,7 @@
+extern void foo(void);
+
+int main(void)
+{
+ foo();
+ return 0;
+}
--- /dev/null 2016-08-19 08:03:37.292222041 +0100
+++ binutils-2.27/ld/testsuite/ld-plugin/lto-4b.c 2016-08-19 12:14:19.603842115 +0100
@@ -0,0 +1,9 @@
+#include <stdio.h>
+
+extern void bar (void);
+
+void foo(void)
+{
+ bar ();
+ printf ("hello foo\n");
+}
--- /dev/null 2016-08-19 08:03:37.292222041 +0100
+++ binutils-2.27/ld/testsuite/ld-plugin/lto-4c.c 2016-08-19 12:14:21.987856760 +0100
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void bar (void)
+{
+ printf ("hello bar\n");
+}
--- /dev/null 2016-08-19 08:03:37.292222041 +0100
+++ binutils-2.27/ld/testsuite/ld-plugin/lto-10a.c 2016-08-19 12:14:27.670891671 +0100
@@ -0,0 +1,6 @@
+extern int foo(void);
+
+int main(void)
+{
+ return foo();
+}
--- /dev/null 2016-08-19 08:03:37.292222041 +0100
+++ binutils-2.27/ld/testsuite/ld-plugin/lto-10b.c 2016-08-19 12:14:33.380926748 +0100
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int foo(void)
+{
+ printf ("hello\n");
+ return 0;
+}

View File

@ -0,0 +1,20 @@
--- binutils-2.27.orig/ld/emultempl/aarch64elf.em 2016-08-19 11:53:37.647284625 +0100
+++ binutils-2.27/ld/emultempl/aarch64elf.em 2016-08-19 11:54:41.916673347 +0100
@@ -43,6 +43,7 @@ gld${EMULATION_NAME}_before_parse (void)
input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
+ link_info.relro = DEFAULT_LD_Z_RELRO;
}
static void
--- binutils-2.27.orig/ld/emultempl/armelf.em 2016-08-19 11:53:37.647284625 +0100
+++ binutils-2.27/ld/emultempl/armelf.em 2016-08-19 11:54:51.035728502 +0100
@@ -52,6 +52,7 @@ gld${EMULATION_NAME}_before_parse (void)
input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
+ link_info.relro = DEFAULT_LD_Z_RELRO;
}
static void

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,7 @@
Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.27
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv3+
Group: Development/Tools
URL: http://sources.redhat.com/binutils
@ -59,6 +59,10 @@ Patch13: binutils-2.26-fix-compile-warnings.patch
Patch14: binutils-2.26-lto.patch
# Fix computation of sh_info field for .dynsym sections
Patch15: binutils-2.27-local-dynsym-count.patch
# Put sections in a monotonically increasing order of file offset.
Patch16: binutils-2.27-monotonic-section-offsets.patch
# Make ARM and AArch64 ports properly support relro on by default.
Patch17: binutils-2.27-arm-aarch64-default-relro.patch
Provides: bundled(libiberty)
@ -182,7 +186,8 @@ using libelf instead of BFD.
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
@ -511,6 +516,10 @@ exit 0
%endif # %{isnative}
%changelog
* Fri Aug 19 2016 Nick Clifton <nickc@redhat.com> 2.27-3
- Put sections in a monotonically increasing order of file offset.
- Allow ARM and AArch64 targets to have relro on by default.
* Mon Aug 15 2016 Nick Clifton <nickc@redhat.com> 2.27-2
- Fix computation of sh_info field in the header of .dynsym sections.