packages: binutils/binutils.spec, binutils/binutils-warn_ro_relocs.patch (N...
pluto
pluto at pld-linux.org
Wed Jun 8 10:23:31 CEST 2011
Author: pluto Date: Wed Jun 8 08:23:31 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- emit proper warning about relocation in shared objects' text segment
instead of memory gpf.
ld: warning: relocation in readonly section `.rodata'.
ld: warning: creating a DT_TEXTREL in a shared object.
- release 4.
---- Files affected:
packages/binutils:
binutils.spec (1.341 -> 1.342) , binutils-warn_ro_relocs.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/binutils/binutils.spec
diff -u packages/binutils/binutils.spec:1.341 packages/binutils/binutils.spec:1.342
--- packages/binutils/binutils.spec:1.341 Tue Jun 7 12:55:11 2011
+++ packages/binutils/binutils.spec Wed Jun 8 10:23:25 2011
@@ -18,7 +18,7 @@
Summary(uk.UTF-8): Набір інструментів GNU для побудови виконуваних програм
Name: binutils
Version: 2.21.51.0.9
-Release: 3
+Release: 4
Epoch: 3
License: GPL v3+
Group: Development/Tools
@@ -36,6 +36,7 @@
Patch8: %{name}-build-id.patch
Patch9: %{name}-tooldir.patch
Patch10: %{name}-pr12163.patch
+Patch11: %{name}-warn_ro_relocs.patch
URL: http://sources.redhat.com/binutils/
BuildRequires: autoconf >= 2.64
BuildRequires: automake >= 1:1.11
@@ -157,6 +158,7 @@
%patch8 -p0
%patch9 -p1
%patch10 -p1
+%patch11 -p1
# file contains hacks for ac 2.59 only
%{__rm} config/override.m4
@@ -352,6 +354,13 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.342 2011/06/08 08:23:25 pluto
+- emit proper warning about relocation in shared objects' text segment
+ instead of memory gpf.
+ ld: warning: relocation in readonly section `.rodata'.
+ ld: warning: creating a DT_TEXTREL in a shared object.
+- release 4.
+
Revision 1.341 2011/06/07 10:55:11 arekm
- release 3
================================================================
Index: packages/binutils/binutils-warn_ro_relocs.patch
diff -u /dev/null packages/binutils/binutils-warn_ro_relocs.patch:1.1
--- /dev/null Wed Jun 8 10:23:31 2011
+++ packages/binutils/binutils-warn_ro_relocs.patch Wed Jun 8 10:23:26 2011
@@ -0,0 +1,52 @@
+commit cd83a0f5f7496853f21ae956ffcc3759adee1c1f
+Author: H.J. Lu <hjl.tools at gmail.com>
+Date: Wed Jun 1 19:42:00 2011 +0000
+
+ Properly warn relocation in readonly section in a shared object.
+
+ 2011-06-01 H.J. Lu <hongjiu.lu at intel.com>
+
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
+ relocation in readonly section in a shared object.
+ * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
+
+diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
+index ee1511f..eea2263 100644
+--- a/bfd/elf32-i386.c
++++ b/bfd/elf32-i386.c
+@@ -2488,13 +2488,13 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ {
+ srel = elf_section_data (p->sec)->sreloc;
+ srel->size += p->count * sizeof (Elf32_External_Rel);
+- if ((p->sec->output_section->flags & SEC_READONLY) != 0)
++ if ((p->sec->output_section->flags & SEC_READONLY) != 0
++ && (info->flags & DF_TEXTREL) == 0)
+ {
+ info->flags |= DF_TEXTREL;
+ if (info->warn_shared_textrel && info->shared)
+ info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'.\n"),
+ p->sec->owner, p->sec);
+- break;
+ }
+ }
+ }
+diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
+index 5cbaff8..9d6d4a4 100644
+--- a/bfd/elf64-x86-64.c
++++ b/bfd/elf64-x86-64.c
+@@ -2399,13 +2399,13 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
+ {
+ srel = elf_section_data (p->sec)->sreloc;
+ srel->size += p->count * bed->s->sizeof_rela;
+- if ((p->sec->output_section->flags & SEC_READONLY) != 0)
++ if ((p->sec->output_section->flags & SEC_READONLY) != 0
++ && (info->flags & DF_TEXTREL) == 0)
+ {
+ info->flags |= DF_TEXTREL;
+ if (info->warn_shared_textrel && info->shared)
+ info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'.\n"),
+ p->sec->owner, p->sec);
+- break;
+ }
+ }
+ }
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/binutils/binutils.spec?r1=1.341&r2=1.342&f=u
More information about the pld-cvs-commit
mailing list