X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-m68hc12.c;h=728ac2565a66be04bda252af42688ee260250089;hb=d546b61084cec687e0063b2e0e169b4690341c23;hp=2247edcc607b3aff6ff4655251ead3cefef0a256;hpb=827041555ac443bd57340060f3e034fd7b199dd8;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c index 2247edcc60..728ac2565a 100644 --- a/bfd/elf32-m68hc12.c +++ b/bfd/elf32-m68hc12.c @@ -1,5 +1,5 @@ /* Motorola 68HC12-specific support for 32-bit ELF - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2021 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) (Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com)) @@ -535,6 +535,14 @@ m68hc12_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) stub_entry = (struct elf32_m68hc11_stub_hash_entry *) gen_entry; info = (struct bfd_link_info *) in_arg; + /* Fail if the target section could not be assigned to an output + section. The user should fix his linker script. */ + if (stub_entry->target_section->output_section == NULL + && info->non_contiguous_regions) + info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. " + "Retry without --enable-non-contiguous-regions.\n"), + stub_entry->target_section); + htab = m68hc11_elf_hash_table (info); stub_sec = stub_entry->stub_sec; @@ -654,10 +662,9 @@ static const struct bfd_elf_special_section elf32_m68hc12_special_sections[] = #define elf_backend_check_relocs elf32_m68hc11_check_relocs #define elf_backend_relocate_section elf32_m68hc11_relocate_section #define elf_backend_object_p m68hc12_elf_set_mach_from_flags -#define elf_backend_final_write_processing 0 #define elf_backend_can_gc_sections 1 #define elf_backend_special_sections elf32_m68hc12_special_sections -#define elf_backend_post_process_headers elf32_m68hc11_post_process_headers +#define elf_backend_init_file_header elf32_m68hc11_init_file_header #define elf_backend_add_symbol_hook elf32_m68hc11_add_symbol_hook #define elf_backend_merge_symbol_attribute elf32_m68hc11_merge_symbol_attribute