* elf64-hppa.c (elf64_hppa_finish_dynamic_sections)
authorMaciej W. Rozycki <macro@linux-mips.org>
Sun, 28 Jul 2013 23:05:18 +0000 (23:05 +0000)
committerMaciej W. Rozycki <macro@linux-mips.org>
Sun, 28 Jul 2013 23:05:18 +0000 (23:05 +0000)
<DT_HP_LOAD_MAP>: Return unsuccessfully if there's no `.data'
section.

bfd/ChangeLog
bfd/elf64-hppa.c

index 88b9448b367e068e32f47b19c7a50ee49e6909ec..62cb27075223a6df383e52c3e212211c15bb5a48 100644 (file)
@@ -1,3 +1,9 @@
+2013-07-28  Maciej W. Rozycki  <macro@linux-mips.org>
+
+       * elf64-hppa.c (elf64_hppa_finish_dynamic_sections)
+       <DT_HP_LOAD_MAP>: Return unsuccessfully if there's no `.data'
+       section.
+
 2013-07-27  Andrew Pinski  <apinski@cavium.com>
 
        * elfnn-aarch64.c (elfNN_aarch64_check_relocs):
index aff87f0d1787b8a1aa80a56d3fe031fc48af1444..044ada5d39d27e229b7271c339159a539583acd8 100644 (file)
@@ -2524,6 +2524,8 @@ elf64_hppa_finish_dynamic_sections (bfd *output_bfd,
                 area at the start of the .data section.  So all we have to
                 to is find the start of the .data section.  */
              s = bfd_get_section_by_name (output_bfd, ".data");
+             if (!s)
+               return FALSE;
              dyn.d_un.d_ptr = s->vma;
              bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
              break;