2.17.50.0.12-4

This commit is contained in:
Jakub Jelinek 2007-04-14 15:21:02 +00:00
parent 7833793c1b
commit 5f0e45256b
2 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,45 @@
2007-04-14 Jakub Jelinek <jakub@redhat.com>
* elflink.c (bfd_elf_final_link): Don't free symbuf for
non-elf input bfds.
(bfd_elf_size_dynamic_sections): Don't access elf_section_data
for non-elf input bfds.
--- bfd/elflink.c.jj 2007-04-07 10:19:03.000000000 +0200
+++ bfd/elflink.c 2007-04-14 14:49:15.000000000 +0200
@@ -5522,15 +5522,16 @@ bfd_elf_size_dynamic_sections (bfd *outp
for (sub = info->input_bfds; sub != NULL;
sub = sub->link_next)
- for (o = sub->sections; o != NULL; o = o->next)
- if (elf_section_data (o)->this_hdr.sh_type
- == SHT_PREINIT_ARRAY)
- {
- (*_bfd_error_handler)
- (_("%B: .preinit_array section is not allowed in DSO"),
- sub);
- break;
- }
+ if (bfd_get_flavour (sub) == bfd_target_elf_flavour)
+ for (o = sub->sections; o != NULL; o = o->next)
+ if (elf_section_data (o)->this_hdr.sh_type
+ == SHT_PREINIT_ARRAY)
+ {
+ (*_bfd_error_handler)
+ (_("%B: .preinit_array section is not allowed in DSO"),
+ sub);
+ break;
+ }
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
@@ -9533,7 +9534,8 @@ bfd_elf_final_link (bfd *abfd, struct bf
if (!info->reduce_memory_overheads)
{
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
- if (elf_tdata (sub)->symbuf)
+ if (bfd_get_flavour (sub) == bfd_target_elf_flavour
+ && elf_tdata (sub)->symbuf)
{
free (elf_tdata (sub)->symbuf);
elf_tdata (sub)->symbuf = NULL;

View File

@ -1,7 +1,7 @@
Summary: A GNU collection of binary utilities.
Name: binutils
Version: 2.17.50.0.12
Release: 3
Release: 4
License: GPL
Group: Development/Tools
URL: http://sources.redhat.com/binutils
@ -14,6 +14,7 @@ Patch5: binutils-2.17.50.0.12-standards.patch
Patch6: binutils-2.17.50.0.12-build-fixes.patch
Patch7: binutils-2.17.50.0.12-symbolic-envvar-revert.patch
Patch8: binutils-2.17.50.0.12-osabi.patch
Patch9: binutils-2.17.50.0.12-rh235747.patch
Buildroot: %{_tmppath}/binutils-root
BuildRequires: texinfo >= 4.0, dejagnu, gettext, flex, bison
@ -63,6 +64,7 @@ to consider using libelf instead of BFD.
%patch6 -p0 -b .build-fixes~
%patch7 -p0 -b .tekhex~
%patch8 -p0 -b .osabi~
%patch9 -p0 -b .rh235747~
# On ppc64 we might use 64K pages
sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*ppc.c
@ -212,6 +214,9 @@ fi
%{_infodir}/bfd*info*
%changelog
* Sat Apr 14 2007 Jakub Jelinek <jakub@redhat.com> 2.17.50.0.12-4
- fix linking non-ELF input objects into ELF output (#235747)
* Wed Mar 14 2007 Jakub Jelinek <jakub@redhat.com> 2.17.50.0.12-3
- don't require matching ELF_OSABI for target vecs with ELFOSABI_NONE,
only prefer specific osabi target vecs over the generic ones