* emultempl/elf32.em (_after_open): Check for get_elf_backend_data

returning NULL.
This commit is contained in:
Nick Clifton 2010-08-20 15:01:45 +00:00
parent 736cba80b3
commit c13526cafc
2 changed files with 11 additions and 3 deletions

View File

@ -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.

View File

@ -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;