diff options
author | Nick Clifton <nickc@redhat.com> | 2010-08-20 15:01:45 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-08-20 15:01:45 +0000 |
commit | c13526cafc27ecf6970b72acb1157e6e04af9e50 (patch) | |
tree | 0a6b04ee30c7072587f679dedeb7c78d588872ad | |
parent | 736cba80b31789271770d7e7716e873695336c3b (diff) | |
download | gdb-c13526cafc27ecf6970b72acb1157e6e04af9e50.zip gdb-c13526cafc27ecf6970b72acb1157e6e04af9e50.tar.gz gdb-c13526cafc27ecf6970b72acb1157e6e04af9e50.tar.bz2 |
* emultempl/elf32.em (_after_open): Check for get_elf_backend_data
returning NULL.
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/emultempl/elf32.em | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index e0873ae..d417ef8 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2010-08-20 Nick Clifton <nickc@redhat.com> + + * emultempl/elf32.em (_after_open): Check for get_elf_backend_data + returning NULL. + 2010-08-19 Alan Modra <amodra@gmail.com> * ld.texinfo (Expression Section): Detail expression evaluation. 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; |