* emultempl/elf32.em (after_open): Return immediately when
        non-ELF output.
This commit is contained in:
Alan Modra 2007-08-15 06:03:11 +00:00
parent e5908723e5
commit d10e7fcce7
2 changed files with 37 additions and 32 deletions

View File

@ -1,3 +1,9 @@
2007-08-15 Alan Modra <amodra@bigpond.net.au>
PR 4923
* emultempl/elf32.em (after_open): Return immediately when
non-ELF output.
2007-08-12 Daniel Jacobowitz <dan@codesourcery.com>
* configure.in (ALL_LINGUAS): Add fi.

View File

@ -1032,6 +1032,11 @@ static void
gld${EMULATION_NAME}_after_open (void)
{
struct bfd_link_needed_list *needed, *l;
struct elf_link_hash_table *htab;
htab = elf_hash_table (&link_info);
if (!is_elf_hash_table (htab))
return;
if (link_info.emit_note_gnu_build_id)
{
@ -1076,14 +1081,11 @@ gld${EMULATION_NAME}_after_open (void)
}
}
if (link_info.eh_frame_hdr
&& ! link_info.traditional_format
&& ! link_info.relocatable)
{
struct elf_link_hash_table *htab;
if (link_info.relocatable)
return;
htab = elf_hash_table (&link_info);
if (is_elf_hash_table (htab))
if (link_info.eh_frame_hdr
&& !link_info.traditional_format)
{
bfd *abfd;
asection *s;
@ -1110,11 +1112,6 @@ gld${EMULATION_NAME}_after_open (void)
" --eh-frame-hdr ignored.\n");
}
}
}
/* We only need to worry about this when doing a final link. */
if (link_info.relocatable || !link_info.executable)
return;
/* Get the list of files which appear in DT_NEEDED entries in
dynamic objects included in the link (often there will be none).
@ -1125,6 +1122,8 @@ gld${EMULATION_NAME}_after_open (void)
special action by the person doing the link. Note that the
needed list can actually grow while we are stepping through this
loop. */
if (!link_info.executable)
return;
needed = bfd_elf_get_needed_list (output_bfd, &link_info);
for (l = needed; l != NULL; l = l->next)
{