]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - pkgs/core/binutils/patches/binutils-2.20.51.0.2-build-id.patch
02abef414b56c09c5aee8d5317c671cdfdd1a22f
[people/ms/ipfire-3.x.git] / pkgs / core / binutils / patches / binutils-2.20.51.0.2-build-id.patch
1 diff -rcp ../binutils-2.20.51.0.7.original/bfd/elfcode.h ./bfd/elfcode.h
2 *** ../binutils-2.20.51.0.7.original/bfd/elfcode.h 2010-04-08 15:29:32.000000000 +0100
3 --- ./bfd/elfcode.h 2010-04-08 15:29:39.000000000 +0100
4 *************** elf_checksum_contents (bfd *abfd,
5 *** 1188,1193 ****
6 --- 1188,1211 ----
7
8 if (i_shdr.contents)
9 (*process) (i_shdr.contents, i_shdr.sh_size, arg);
10 + else
11 + {
12 + asection *sec;
13 +
14 + sec = bfd_section_from_elf_index (abfd, count);
15 + if (sec != NULL)
16 + {
17 + if (sec->contents == NULL)
18 + {
19 + /* Force rereading from file. */
20 + sec->flags &= ~SEC_IN_MEMORY;
21 + if (! bfd_malloc_and_get_section (abfd, sec, & sec->contents))
22 + continue;
23 + }
24 + if (sec->contents != NULL)
25 + (*process) (sec->contents, i_shdr.sh_size, arg);
26 + }
27 + }
28 }
29
30 return TRUE;
31 diff -rcp ../binutils-2.20.51.0.7.original/bfd/section.c ./bfd/section.c
32 *** ../binutils-2.20.51.0.7.original/bfd/section.c 2010-04-08 15:29:32.000000000 +0100
33 --- ./bfd/section.c 2010-04-08 15:29:39.000000000 +0100
34 *************** bfd_malloc_and_get_section (bfd *abfd, s
35 *** 1488,1494 ****
36 return TRUE;
37
38 p = (bfd_byte *)
39 ! bfd_malloc (sec->rawsize > sec->size ? sec->rawsize : sec->size);
40 if (p == NULL)
41 return FALSE;
42 *buf = p;
43 --- 1488,1494 ----
44 return TRUE;
45
46 p = (bfd_byte *)
47 ! bfd_zmalloc (sec->rawsize > sec->size ? sec->rawsize : sec->size);
48 if (p == NULL)
49 return FALSE;
50 *buf = p;
51 diff -rcp ../binutils-2.20.51.0.7.original/bfd/section.c.orig ./bfd/section.c.orig