X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf32-arm.c;h=e8b2ac4702ad6eec2271316461fa3d943866c088;hb=abf874aafe3d717573e4a48bf0e3c6334e666a55;hp=c899aeb8f6b3874eed404956ad882097bb16de01;hpb=74e10d1742f1b8312359c59a2af06c9e661252b3;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index c899aeb8f6..e8b2ac4702 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -5064,6 +5064,17 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, stub_entry = (struct elf32_arm_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(); + } + globals = elf32_arm_hash_table (info); if (globals == NULL) return FALSE;