summaryrefslogtreecommitdiff
path: root/patches/binutils/2.19.1/150-warn-textrel.patch
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-03-08 11:14:03 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-03-08 11:14:03 (GMT)
commit5e2f711dbfa4c50335abe1247991a941cd7e418c (patch)
tree85dce724c6f76cea2f9f52d900a15dfb727174bc /patches/binutils/2.19.1/150-warn-textrel.patch
parent6343b71e2556c0c2e27b45f0cb50c94a98a773e2 (diff)
Add binutils-2.19.1 patchset, propagated from the 2.19 patchset.
/trunk/patches/binutils/2.19.1/120-sh-targets.patch | 57 57 0 0 +++ /trunk/patches/binutils/2.19.1/170-use-relro.patch | 19 19 0 0 + /trunk/patches/binutils/2.19.1/160-use-new-ld-dtags.patch | 19 19 0 0 + /trunk/patches/binutils/2.19.1/180-libiberty-pic.patch | 19 19 0 0 + /trunk/patches/binutils/2.19.1/100-ppc64-pie.patch | 25 25 0 0 + /trunk/patches/binutils/2.19.1/110-RPATH_ENVVAR-smack.patch | 22 22 0 0 + /trunk/patches/binutils/2.19.1/140-pt-pax-flags-20081101.patch | 254 254 0 0 +++++++++++++++ /trunk/patches/binutils/2.19.1/150-warn-textrel.patch | 53 53 0 0 +++ /trunk/patches/binutils/2.19.1/130-check_ldrunpath_length.patch | 36 36 0 0 ++ 9 files changed, 504 insertions(+)
Diffstat (limited to 'patches/binutils/2.19.1/150-warn-textrel.patch')
-rw-r--r--patches/binutils/2.19.1/150-warn-textrel.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/patches/binutils/2.19.1/150-warn-textrel.patch b/patches/binutils/2.19.1/150-warn-textrel.patch
new file mode 100644
index 0000000..dab77b1
--- /dev/null
+++ b/patches/binutils/2.19.1/150-warn-textrel.patch
@@ -0,0 +1,53 @@
+Original patch from: ../crosstool-NG/ct-ng.trunk/patches/binutils/2.19/150-warn-textrel.patch
+
+-= BEGIN original header =-
+Original patch from Gentoo:
+gentoo/src/patchsets/binutils/2.19/66_all_binutils-2.18.50.0.2-warn-textrel.patch
+
+textrels are bad for forcing copy-on-write (this affects everyone),
+and for security/runtime code generation, this affects security ppl.
+But in either case, it doesn't matter who needs textrels, it's
+the very fact that they're needed at all.
+
+-= END original header =-
+
+diff -durN binutils-2.19.1.orig/bfd/elflink.c binutils-2.19.1/bfd/elflink.c
+--- binutils-2.19.1.orig/bfd/elflink.c 2009-03-08 11:57:02.000000000 +0100
++++ binutils-2.19.1/bfd/elflink.c 2009-03-08 11:57:02.000000000 +0100
+@@ -10820,14 +10820,12 @@
+ goto error_return;
+
+ /* Check for DT_TEXTREL (late, in case the backend removes it). */
+- if (info->warn_shared_textrel && info->shared)
++ o = bfd_get_section_by_name (dynobj, ".dynamic");
++ if (info->warn_shared_textrel && o != NULL)
+ {
+ bfd_byte *dyncon, *dynconend;
+
+ /* Fix up .dynamic entries. */
+- o = bfd_get_section_by_name (dynobj, ".dynamic");
+- BFD_ASSERT (o != NULL);
+-
+ dyncon = o->contents;
+ dynconend = o->contents + o->size;
+ for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn)
+@@ -10839,7 +10837,7 @@
+ if (dyn.d_tag == DT_TEXTREL)
+ {
+ info->callbacks->einfo
+- (_("%P: warning: creating a DT_TEXTREL in a shared object.\n"));
++ (_("%P: warning: creating a DT_TEXTREL in object.\n"));
+ break;
+ }
+ }
+diff -durN binutils-2.19.1.orig/ld/ldmain.c binutils-2.19.1/ld/ldmain.c
+--- binutils-2.19.1.orig/ld/ldmain.c 2008-08-17 05:12:50.000000000 +0200
++++ binutils-2.19.1/ld/ldmain.c 2009-03-08 11:57:02.000000000 +0100
+@@ -274,6 +274,7 @@
+ link_info.relax_pass = 1;
+ link_info.pei386_auto_import = -1;
+ link_info.spare_dynamic_tags = 5;
++ link_info.warn_shared_textrel = TRUE;
+ link_info.path_separator = ':';
+
+ ldfile_add_arch ("");