Add patch for BZ 472152 to fix build-id generation.

This commit is contained in:
Nicholas Clifton 2008-11-29 07:54:12 +00:00
parent e8a32cc91a
commit 15996d5ef0
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,22 @@
--- ../binutils-2.19.50.0.1.orig/bfd/elfcode.h 2008-11-26 09:29:54.000000000 +0000
+++ ./bfd/elfcode.h 2008-11-26 12:01:37.000000000 +0000
@@ -1170,6 +1170,19 @@ elf_checksum_contents (bfd *abfd,
if (i_shdr.contents)
(*process) (i_shdr.contents, i_shdr.sh_size, arg);
+ else
+ {
+ asection *sec;
+
+ sec = bfd_section_from_elf_index (abfd, count);
+ if (sec != NULL)
+ {
+ if (sec->contents == NULL)
+ bfd_malloc_and_get_section (abfd, sec, & sec->contents);
+ if (sec->contents != NULL)
+ (*process) (sec->contents, i_shdr.sh_size, arg);
+ }
+ }
}
return TRUE;

View File

@ -30,6 +30,7 @@ Patch04: binutils-2.19.50.0.1-symbolic-envvar-revert.patch
Patch05: binutils-2.19.50.0.1-version.patch Patch05: binutils-2.19.50.0.1-version.patch
Patch06: binutils-2.19.50.0.1-set-long-long.patch Patch06: binutils-2.19.50.0.1-set-long-long.patch
Patch07: binutils-2.19.50.0.1-linkonce-r-discard.patch Patch07: binutils-2.19.50.0.1-linkonce-r-discard.patch
Patch08: binutils-2.19.50.0.1-build-id.patch
%if 0%{?_with_debug:1} %if 0%{?_with_debug:1}
# Define this if you want to skip the strip step and preserve debug info. # Define this if you want to skip the strip step and preserve debug info.
@ -100,6 +101,7 @@ to consider using libelf instead of BFD.
%patch05 -p0 -b .version~ %patch05 -p0 -b .version~
%patch06 -p0 -b .set-long-long~ %patch06 -p0 -b .set-long-long~
%patch07 -p0 -b .linkonce-r-discard~ %patch07 -p0 -b .linkonce-r-discard~
%patch08 -p0 -b .build-id~
# We cannot run autotools as there is an exact requirement of autoconf-2.59. # We cannot run autotools as there is an exact requirement of autoconf-2.59.
@ -343,6 +345,10 @@ fi
%endif # %{isnative} %endif # %{isnative}
%changelog %changelog
* Sat Nov 29 2008 Nick Clifton <nickc@redhat.com> 2.19.50.0.1
- Add build-id patch to ensure that section contents are incorporated
into a build id. (BZ472152)
* Fri Nov 21 2008 Nick Clifton <nickc@redhat.com> 2.19.50.0.1 * Fri Nov 21 2008 Nick Clifton <nickc@redhat.com> 2.19.50.0.1
- Rebase sources on 2.19.50.0.1 tarball. Update all patches, trimming - Rebase sources on 2.19.50.0.1 tarball. Update all patches, trimming
those that are no longer needed. those that are no longer needed.