diff options
author | Alan Modra <amodra@gmail.com> | 2003-12-01 06:28:56 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-12-01 06:28:56 +0000 |
commit | fd574c4615e74de554c78fd2c42f368f0cbc7905 (patch) | |
tree | b4785f9d2aae4b4a2575902ba6fb58d3e6b613a5 /ld/emultempl/hppaelf.em | |
parent | 0eddce27a9195929e73ce37c4bd1914b3b88118b (diff) | |
download | fsf-binutils-gdb-fd574c4615e74de554c78fd2c42f368f0cbc7905.zip fsf-binutils-gdb-fd574c4615e74de554c78fd2c42f368f0cbc7905.tar.gz fsf-binutils-gdb-fd574c4615e74de554c78fd2c42f368f0cbc7905.tar.bz2 |
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Test
hash table type rather than testing creator flavour.
* emultempl/hppaelf.em (hppaelf_create_output_section_statements):
Only create stub_file bfd if hash table creator is as expected.
(gld${EMULATION_NAME}_finish): Test stub_file.
Diffstat (limited to 'ld/emultempl/hppaelf.em')
-rw-r--r-- | ld/emultempl/hppaelf.em | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em index 1ee43ac..e9445f2 100644 --- a/ld/emultempl/hppaelf.em +++ b/ld/emultempl/hppaelf.em @@ -66,6 +66,13 @@ hppaelf_after_parse (void) static void hppaelf_create_output_section_statements (void) { + extern const bfd_target bfd_elf32_hppa_linux_vec; + extern const bfd_target bfd_elf32_hppa_vec; + + if (link_info.hash->creator != &bfd_elf32_hppa_linux_vec + && link_info.hash->creator != &bfd_elf32_hppa_vec) + return; + stub_file = lang_add_input_file ("linker stubs", lang_input_file_is_fake_enum, NULL); @@ -256,7 +263,7 @@ gld${EMULATION_NAME}_finish (void) /* If generating a relocatable output file, then we don't have to examine the relocs. */ - if (! link_info.relocatable) + if (stub_file != NULL && !link_info.relocatable) { int ret = elf32_hppa_setup_section_lists (output_bfd, &link_info); @@ -298,7 +305,7 @@ gld${EMULATION_NAME}_finish (void) } /* Now build the linker stubs. */ - if (stub_file->the_bfd->sections != NULL) + if (stub_file != NULL && stub_file->the_bfd->sections != NULL) { if (! elf32_hppa_build_stubs (&link_info)) einfo ("%X%P: can not build stubs: %E\n"); |