aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-08-20 15:01:45 +0000
committerNick Clifton <nickc@redhat.com>2010-08-20 15:01:45 +0000
commitc13526cafc27ecf6970b72acb1157e6e04af9e50 (patch)
tree0a6b04ee30c7072587f679dedeb7c78d588872ad /ld/emultempl
parent736cba80b31789271770d7e7716e873695336c3b (diff)
downloadgdb-c13526cafc27ecf6970b72acb1157e6e04af9e50.zip
gdb-c13526cafc27ecf6970b72acb1157e6e04af9e50.tar.gz
gdb-c13526cafc27ecf6970b72acb1157e6e04af9e50.tar.bz2
* emultempl/elf32.em (_after_open): Check for get_elf_backend_data
returning NULL.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/elf32.em9
1 files changed, 6 insertions, 3 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 73839d6..2decd18 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1134,9 +1134,12 @@ gld${EMULATION_NAME}_after_open (void)
const struct elf_backend_data *bed;
bed = get_elf_backend_data (abfd);
- s = bfd_make_section_with_flags (abfd, ".eh_frame_hdr",
- bed->dynamic_sec_flags
- | SEC_READONLY);
+ if (bed == NULL)
+ s = NULL;
+ else
+ s = bfd_make_section_with_flags (abfd, ".eh_frame_hdr",
+ bed->dynamic_sec_flags
+ | SEC_READONLY);
if (s != NULL
&& bfd_set_section_alignment (abfd, s, 2))
htab->eh_info.hdr_sec = s;