rpms/binutils/devel binutils-2.17.50.0.2-perturb.patch, NONE, 1.1 binutils-2.17.50.0.2-tls_common.patch, NONE, 1.1 binutils.spec, 1.82, 1.83
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Jun 19 20:58:38 UTC 2006
- Previous message (by thread): rpms/mcstrans/devel .cvsignore, 1.8, 1.9 mcstrans.spec, 1.13, 1.14 sources, 1.8, 1.9
- Next message (by thread): rpms/fedora-release/devel fedora-release.spec, 1.35, 1.36 sources, 1.27, 1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jakub
Update of /cvs/dist/rpms/binutils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv14919
Modified Files:
binutils.spec
Added Files:
binutils-2.17.50.0.2-perturb.patch
binutils-2.17.50.0.2-tls_common.patch
Log Message:
2.17.50.0.2-3
binutils-2.17.50.0.2-perturb.patch:
bfd.c | 2 ++
elf.c | 1 +
2 files changed, 3 insertions(+)
--- NEW FILE binutils-2.17.50.0.2-perturb.patch ---
Hi!
MALLOC_PERTURB_=<some_nonzero_value> causes linker failures and running ld
under valgrind reports the same. The following patch initializes the 3
fields that weren't being cleared, although later on ld relied on it.
Ok to commit?
2006-06-19 Jakub Jelinek <jakub at redhat.com>
* bfd.c (bfd_record_phdr): Clear p_align and p_align_valid fields.
* elf.c (_bfd_elf_link_hash_table_init): Clear hplt field.
--- bfd/bfd.c.jj 2006-06-15 14:31:01.000000000 +0200
+++ bfd/bfd.c 2006-06-19 10:47:58.000000000 +0200
@@ -1336,6 +1336,8 @@ bfd_record_phdr (bfd *abfd,
m->includes_filehdr = includes_filehdr;
m->includes_phdrs = includes_phdrs;
m->count = count;
+ m->p_align_valid = FALSE;
+ m->p_align = 0;
if (count > 0)
memcpy (m->sections, secs, count * sizeof (asection *));
--- bfd/elf.c.jj 2006-06-19 10:57:51.000000000 +0200
+++ bfd/elf.c 2006-06-19 10:57:51.000000000 +0200
@@ -1579,6 +1579,7 @@ _bfd_elf_link_hash_table_init
table->bucketcount = 0;
table->needed = NULL;
table->hgot = NULL;
+ table->hplt = NULL;
table->merge_info = NULL;
memset (&table->stab_info, 0, sizeof (table->stab_info));
memset (&table->eh_info, 0, sizeof (table->eh_info));
Jakub
binutils-2.17.50.0.2-tls_common.patch:
bfd/elflink.c | 3 +
ld/testsuite/ld-elf/tls_common.exp | 70 +++++++++++++++++++++++++++++++++++++
ld/testsuite/ld-elf/tls_common.s | 11 +++++
3 files changed, 83 insertions(+), 1 deletion(-)
--- NEW FILE binutils-2.17.50.0.2-tls_common.patch ---
2006-06-16 Jakub Jelinek <jakub at redhat.com>
* elflink.c (elf_link_add_object_symbols): Don't create .tcommon
section for relocatable link.
* ld-elf/tls_common.exp: New test.
* ld-elf/tls_common.s: New file.
--- bfd/elflink.c.jj 2006-06-15 14:31:01.000000000 +0200
+++ bfd/elflink.c 2006-06-15 14:40:51.000000000 +0200
@@ -3621,7 +3621,8 @@ elf_link_add_object_symbols (bfd *abfd,
goto error_free_vers;
if (isym->st_shndx == SHN_COMMON
- && ELF_ST_TYPE (isym->st_info) == STT_TLS)
+ && ELF_ST_TYPE (isym->st_info) == STT_TLS
+ && !info->relocatable)
{
asection *tcomm = bfd_get_section_by_name (abfd, ".tcommon");
--- ld/testsuite/ld-elf/tls_common.exp.jj 2006-06-16 16:34:55.000000000 +0200
+++ ld/testsuite/ld-elf/tls_common.exp 2006-06-16 17:15:38.000000000 +0200
@@ -0,0 +1,70 @@
+# Expect script for .tls_common tests
+# Copyright 2006 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Written by Jakub Jelinek (jakub at redhat.com)
+#
+
+# Make sure that binutils can correctly handle ld output in ELF.
+
+# Run on Linux only.
+if { ![istarget *-*-linux*] } {
+ return
+}
+
+if { [istarget *-*-linux*aout*]
+ || [istarget *-*-linux*oldld*] } {
+ return
+}
+
+global as
+global ld
+global READELF
+global srcdir
+global subdir
+global link_output
+
+if { ![ld_assemble $as $srcdir/$subdir/tls_common.s tmpdir/tls_common.o ] } {
+ unresolved "tls_common"
+ return
+}
+
+if { ![ld_simple_link $ld tmpdir/tls_common1.o "-r tmpdir/tls_common.o"] } {
+ fail "tls_common"
+ return
+}
+
+if { ![ld_simple_link $ld tmpdir/tls_common "tmpdir/tls_common1.o"] } {
+ if { [string match "*not supported*" $link_output]
+ || [string match "*unrecognized option*" $link_output] } {
+ unsupported "$ld_options is not supported by this target"
+ } elseif { [string match "*Warning*alignment*of common symbol*" $link_output] } {
+ fail "tls_common"
+ } else {
+ unresolved "tls_common"
+ }
+ return
+}
+
+send_log "$READELF -l --wide tmpdir/tls_common\n"
+catch "exec $READELF -l --wide tmpdir/tls_common" readelf_output
+if ![string match "*TLS*0x000000 0x000004 R *" $readelf_output] then {
+ send_log "$readelf_output\n"
+ fail "tls_common"
+ return
+}
+
+pass "tls_common"
--- ld/testsuite/ld-elf/tls_common.s.jj 2006-06-16 16:34:34.000000000 +0200
+++ ld/testsuite/ld-elf/tls_common.s 2006-06-16 16:34:30.000000000 +0200
@@ -0,0 +1,11 @@
+ .globl main
+ .globl start
+ .globl _start
+ .globl __start
+ .text
+main:
+start:
+_start:
+__start:
+ .byte 0
+ .tls_common foo,4,4
Index: binutils.spec
===================================================================
RCS file: /cvs/dist/rpms/binutils/devel/binutils.spec,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- binutils.spec 5 Jun 2006 09:08:22 -0000 1.82
+++ binutils.spec 19 Jun 2006 20:58:36 -0000 1.83
@@ -1,7 +1,7 @@
Summary: A GNU collection of binary utilities.
Name: binutils
Version: 2.17.50.0.2
-Release: 2
+Release: 3
License: GPL
Group: Development/Tools
URL: http://sources.redhat.com/binutils
@@ -17,6 +17,8 @@
Patch8: binutils-2.17.50.0.2-install-info.patch
Patch9: binutils-2.17.50.0.2-kept-section.patch
Patch10: binutils-2.17.50.0.2-bz2721.patch
+Patch11: binutils-2.17.50.0.2-perturb.patch
+Patch12: binutils-2.17.50.0.2-tls_common.patch
Buildroot: %{_tmppath}/binutils-root
BuildRequires: texinfo >= 4.0, dejagnu, gettext, flex, bison
@@ -57,6 +59,8 @@
%patch8 -p0 -b .install-info~
%patch9 -p0 -b .kept-section~
%patch10 -p0 -b .bz2721~
+%patch11 -p0 -b .perturb~
+%patch12 -p0 -b .tls_common~
# libtool sucks
perl -pi -e 'm/LIBADD/ && s/(\.\.\/bfd\/libbfd.la)/-L\.\.\/bfd\/\.libs \1/' opcodes/Makefile.{am,in}
# LTP sucks
@@ -167,6 +171,10 @@
%{_infodir}/*info*
%changelog
+* Mon Jun 19 2006 Jakub Jelinek <jakub at redhat.com> 2.17.50.0.2-3
+- fix two places in ld that misbehaved with MALLOC_PERTURB_=N
+- fix .tls_common handling in relocatable linking
+
* Mon Jun 5 2006 Jakub Jelinek <jakub at redhat.com> 2.17.50.0.2-2
- fix --as-needed (Alan Modra, #193689, BZ#2721)
- Previous message (by thread): rpms/mcstrans/devel .cvsignore, 1.8, 1.9 mcstrans.spec, 1.13, 1.14 sources, 1.8, 1.9
- Next message (by thread): rpms/fedora-release/devel fedora-release.spec, 1.35, 1.36 sources, 1.27, 1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list