From f37111339e22353181634dfb3498923a89f2f16c Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Fri, 12 Jun 2009 14:27:21 +0000 Subject: [PATCH] 2009-06-10 Philip Blundell * emultempl/armelf.em (gld${EMULATION_NAME}_finish): Avoid crash if section has no ELF data. --- ld/ChangeLog | 5 +++++ ld/emultempl/armelf.em | 1 + 2 files changed, 6 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index 89016cc2628..a6f3e50f642 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2009-06-10 Philip Blundell + + * emultempl/armelf.em (gld${EMULATION_NAME}_finish): Avoid crash + if section has no ELF data. + 2009-06-06 H.J. Lu * scripttempl/elf.sc: Add .rel.ifunc and .rela.ifunc. diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em index de7fe689ff7..0713c728d2b 100644 --- a/ld/emultempl/armelf.em +++ b/ld/emultempl/armelf.em @@ -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 -- 2.30.2