diff --git a/.gitignore b/.gitignore index f4da0ad..1cf1fea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ binutils-2.*/ i386 i686 +x86_64 /binutils-*.tar.bz2 .build-* *.src.rpm diff --git a/binutils-2.23.52.0.1-addr2line-dynsymtab.patch b/binutils-2.23.52.0.1-addr2line-dynsymtab.patch new file mode 100644 index 0000000..5c8cabf --- /dev/null +++ b/binutils-2.23.52.0.1-addr2line-dynsymtab.patch @@ -0,0 +1,22 @@ +*** ../binutils-2.23.52.0.1/binutils/addr2line.c 2013-02-27 20:28:03.000000000 +0000 +--- binutils/addr2line.c 2013-03-13 16:46:36.109519735 +0000 +*************** slurp_symtab (bfd *abfd) +*** 130,135 **** +--- 130,146 ---- + symcount = bfd_canonicalize_symtab (abfd, syms); + if (symcount < 0) + bfd_fatal (bfd_get_filename (abfd)); ++ ++ /* If there are no symbols left after canonicalization and ++ we have not tried the dynamic symbols then give them a go. */ ++ if (symcount == 0 ++ && ! dynamic ++ && (storage = bfd_get_dynamic_symtab_upper_bound (abfd)) > 0) ++ { ++ free (syms); ++ syms = xmalloc (storage); ++ symcount = bfd_canonicalize_dynamic_symtab (abfd, syms); ++ } + } + + /* These global variables are used to pass information between diff --git a/binutils.spec b/binutils.spec index e8c0eb7..665539d 100644 --- a/binutils.spec +++ b/binutils.spec @@ -17,7 +17,7 @@ Summary: A GNU collection of binary utilities Name: %{?cross}binutils%{?_with_debug:-debug} Version: 2.23.52.0.1 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv3+ Group: Development/Tools URL: http://sources.redhat.com/binutils @@ -46,6 +46,8 @@ Patch11: binutils-2.23.52.0.1-64-bit-thin-archives.patch Patch12: binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch # Revert HJ's patch for PR15149. This stops the reporting of weak DT_NEEDED symbols. Patch13: binutils-2.23.52.0.1-revert-pr15149.patch +# Fix addr2line to use the dynamic symbol table if it could not find any ordinary symbols. +Patch14: binutils-2.23.52.0.1-addr2line-dynsymtab.patch Provides: bundled(libiberty) @@ -157,6 +159,7 @@ using libelf instead of BFD. %patch11 -p0 -b .64bit-thin-archives~ %patch12 -p0 -b .gas-texinfo~ %patch13 -p0 -b .revert-pr15149~ +%patch14 -p0 -b .addr2line~ # We cannot run autotools as there is an exact requirement of autoconf-2.59. @@ -456,6 +459,9 @@ exit 0 %endif # %{isnative} %changelog +* Wed Mar 13 2013 Nick Clifton - 2.23.52.0.1-8 +- Fix addr2line to use dynamic symbols if it failed to canonicalize ordinary symbols. (#920542) + * Wed Mar 13 2013 Nick Clifton - 2.23.52.0.1-7 - Change requirement to explicitly depend upon /usr/bin/pod2man. (#920545)