]> git.pld-linux.org Git - packages/binutils.git/blame - binutils-build-id.patch
- comment out zlib-static R
[packages/binutils.git] / binutils-build-id.patch
CommitLineData
08d99624
AM
1--- bfd/compress.c.jj 2010-12-24 11:40:19.000000000 +0100
2+++ bfd/compress.c 2011-01-28 15:40:19.869777126 +0100
3@@ -174,7 +174,7 @@ bfd_get_full_section_contents (bfd *abfd
4 case COMPRESS_SECTION_NONE:
5 if (p == NULL)
6 {
7- p = (bfd_byte *) bfd_malloc (sz);
8+ p = (bfd_byte *) bfd_zmalloc (sz);
9 if (p == NULL)
10 return FALSE;
11 }
12@@ -214,7 +214,7 @@ bfd_get_full_section_contents (bfd *abfd
13 if (!ret)
14 goto fail_compressed;
15
16- uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size);
17+ uncompressed_buffer = (bfd_byte *) bfd_zmalloc (uncompressed_size);
18 if (uncompressed_buffer == NULL)
19 goto fail_compressed;
20
21--- bfd/elfcode.h.jj 2010-12-31 03:43:21.000000000 +0100
22+++ bfd/elfcode.h 2011-01-28 15:34:39.055388479 +0100
23@@ -1158,6 +1158,24 @@ elf_checksum_contents (bfd *abfd,
14646ab3
AM
24
25 if (i_shdr.contents)
26 (*process) (i_shdr.contents, i_shdr.sh_size, arg);
27+ else
28+ {
29+ asection *sec;
30+
31+ sec = bfd_section_from_elf_index (abfd, count);
32+ if (sec != NULL)
33+ {
34+ if (sec->contents == NULL)
08d99624
AM
35+ {
36+ /* Force rereading from file. */
37+ sec->flags &= ~SEC_IN_MEMORY;
38+ if (! bfd_malloc_and_get_section (abfd, sec, & sec->contents))
39+ continue;
40+ }
14646ab3
AM
41+ if (sec->contents != NULL)
42+ (*process) (sec->contents, i_shdr.sh_size, arg);
43+ }
44+ }
45 }
46
47 return TRUE;
This page took 0.038656 seconds and 4 git commands to generate.