X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-m68hc12.c;h=a04efd84e0bd04cc861df1a85d92e4e11e0c5510;hb=abf874aafe3d717573e4a48bf0e3c6334e666a55;hp=e41b4c76236ca2db7a536cbd13dc7fe64004b6e9;hpb=74e10d1742f1b8312359c59a2af06c9e661252b3;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c index e41b4c7623..a04efd84e0 100644 --- a/bfd/elf32-m68hc12.c +++ b/bfd/elf32-m68hc12.c @@ -535,6 +535,17 @@ 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) + { + _bfd_error_handler (_("Could not assign '%pA' to an output section. " + "Retry without --enable-non-contiguous-regions.\n"), + stub_entry->target_section); + abort(); + } + htab = m68hc11_elf_hash_table (info); stub_sec = stub_entry->stub_sec;