2 Description: Description: Fix ld corrupt build ID generation
4 Upstream status: Taken from Fedora (BZ 501582)
8 case COMPRESS_SECTION_NONE:
11 - p = (bfd_byte *) bfd_malloc (sz);
12 + p = (bfd_byte *) bfd_zmalloc (sz);
18 @@ -1158,6 +1158,24 @@
21 (*process) (i_shdr.contents, i_shdr.sh_size, arg);
26 + sec = bfd_section_from_elf_index (abfd, count);
29 + if (sec->contents == NULL)
31 + /* Force rereading from file. */
32 + sec->flags &= ~SEC_IN_MEMORY;
33 + if (! bfd_malloc_and_get_section (abfd, sec, & sec->contents))
36 + if (sec->contents != NULL)
37 + (*process) (sec->contents, i_shdr.sh_size, arg);