2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
PR 855 * elf.c (setup_group): Properly handle zero group count.
This commit is contained in:
parent
69308976e8
commit
20dbb49d3c
2 changed files with 14 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR 855
|
||||
* elf.c (setup_group): Properly handle zero group count.
|
||||
|
||||
2005-04-17 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* som.c (hppa_som_reloc, som_mkobject, som_is_space)
|
||||
|
|
14
bfd/elf.c
14
bfd/elf.c
|
@ -481,14 +481,18 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
|
|||
}
|
||||
|
||||
if (num_group == 0)
|
||||
num_group = (unsigned) -1;
|
||||
elf_tdata (abfd)->num_group = num_group;
|
||||
|
||||
if (num_group > 0)
|
||||
{
|
||||
num_group = (unsigned) -1;
|
||||
elf_tdata (abfd)->num_group = num_group;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We keep a list of elf section headers for group sections,
|
||||
so we can find them quickly. */
|
||||
bfd_size_type amt = num_group * sizeof (Elf_Internal_Shdr *);
|
||||
bfd_size_type amt;
|
||||
|
||||
elf_tdata (abfd)->num_group = num_group;
|
||||
amt = num_group * sizeof (Elf_Internal_Shdr *);
|
||||
elf_tdata (abfd)->group_sect_ptr = bfd_alloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->group_sect_ptr == NULL)
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue