From 5f0e45256b275bb1dd5840fe0817a5e4f55549c7 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Apr 14 2007 15:21:02 +0000 Subject: 2.17.50.0.12-4 --- diff --git a/binutils-2.17.50.0.12-rh235747.patch b/binutils-2.17.50.0.12-rh235747.patch new file mode 100644 index 0000000..04c137d --- /dev/null +++ b/binutils-2.17.50.0.12-rh235747.patch @@ -0,0 +1,45 @@ +2007-04-14 Jakub Jelinek + + * 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; diff --git a/binutils.spec b/binutils.spec index 73a2442..e39b127 100644 --- a/binutils.spec +++ b/binutils.spec @@ -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 2.17.50.0.12-4 +- fix linking non-ELF input objects into ELF output (#235747) + * Wed Mar 14 2007 Jakub Jelinek 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