diff options
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index fc8c182..0944ba7 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -2550,13 +2550,16 @@ struct _ppc64_elf_section_data static bfd_boolean ppc64_elf_new_section_hook (bfd *abfd, asection *sec) { - struct _ppc64_elf_section_data *sdata; - bfd_size_type amt = sizeof (*sdata); + if (!sec->used_by_bfd) + { + struct _ppc64_elf_section_data *sdata; + bfd_size_type amt = sizeof (*sdata); - sdata = bfd_zalloc (abfd, amt); - if (sdata == NULL) - return FALSE; - sec->used_by_bfd = sdata; + sdata = bfd_zalloc (abfd, amt); + if (sdata == NULL) + return FALSE; + sec->used_by_bfd = sdata; + } return _bfd_elf_new_section_hook (abfd, sec); } |