2009-06-10 Philip Blundell <philb@gnu.org>
authorPhil Blundell <philb@gnu.org>
Fri, 12 Jun 2009 14:27:21 +0000 (14:27 +0000)
committerPhil Blundell <philb@gnu.org>
Fri, 12 Jun 2009 14:27:21 +0000 (14:27 +0000)
* emultempl/armelf.em (gld${EMULATION_NAME}_finish): Avoid crash
if section has no ELF data.

ld/ChangeLog
ld/emultempl/armelf.em

index 89016cc26281c4a77d2a4eb4f23d66970afd61f9..a6f3e50f642dcc932b422e3a596e05310c37a102 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-10  Philip Blundell  <philb@gnu.org>
+
+       * emultempl/armelf.em (gld${EMULATION_NAME}_finish): Avoid crash
+       if section has no ELF data.
+
 2009-06-06  H.J. Lu  <hongjiu.lu@intel.com>
 
        * scripttempl/elf.sc: Add .rel.ifunc and .rela.ifunc.
index de7fe689ff7fced90d9fac2fba529ff5155aa986..0713c728d2b6506d8ea6b906c85e2e1f516a9deb 100644 (file)
@@ -309,6 +309,7 @@ gld${EMULATION_NAME}_finish (void)
              asection *out_sec = sec->output_section;
 
              if (out_sec
+                 && elf_section_data (sec)
                  && elf_section_type (sec) == SHT_PROGBITS
                  && (elf_section_flags (sec) & SHF_EXECINSTR) != 0
                  && (sec->flags & SEC_EXCLUDE) == 0