diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2020-03-17 15:59:01 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2020-03-18 10:09:43 +0000 |
commit | 53215f214c61b850085196a8d69774eed026ecd9 (patch) | |
tree | ce76a728bc37dea37feb8b6a5c25aecfda4da522 /bfd/elf64-ppc.c | |
parent | 5a82b8a12b6a9b8167517ab1df1dcdcc4711ffda (diff) | |
download | gdb-53215f214c61b850085196a8d69774eed026ecd9.zip gdb-53215f214c61b850085196a8d69774eed026ecd9.tar.gz gdb-53215f214c61b850085196a8d69774eed026ecd9.tar.bz2 |
Non-contiguous memory regions support: Avoid calls to abort
Use '%F' format when printing error messages to exit cleanly rather
than by calling abort().
2020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
bfd/
* elf32-arm.c (arm_build_one_stub): Emit a fatal error message
instead of calling abort.
* elf32-csky.c (csky_build_one_stub): Likewise.
* elf32-hppa.c (hppa_build_one_stub): Likewise.
* elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
* elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
* elf32-metag.c (metag_build_one_stub): Likewise.
* elf32-nios2.c (nios2_build_one_stub): Likewise.
* elf64-ppc.c (ppc_build_one_stub): Likewise.
(ppc_size_one_stub): Likewise.
* elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
ld/
* emultempl/xtensaelf.em: Emit a fatal error message
instead of calling abort.
* ldlang.c: Likewise.
Change-Id: I60deaeeee59d4e7cab06b8a40a3e51837c43a8ab
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 83eaadf..7f7e190 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -11367,25 +11367,19 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (stub_entry->target_section != NULL && 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(); - } + info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. " + "Retry without --enable-non-contiguous-regions.\n"), + stub_entry->target_section); /* Same for the group. */ if (stub_entry->group->stub_sec != NULL && stub_entry->group->stub_sec->output_section == NULL && info->non_contiguous_regions) - { - _bfd_error_handler (_("Could not assign group %pA target %pA to an " - "output section. Retry without " - "--enable-non-contiguous-regions.\n"), - stub_entry->group->stub_sec, - stub_entry->target_section); - abort(); - } + info->callbacks->einfo (_("%F%P: Could not assign group %pA target %pA to an " + "output section. Retry without " + "--enable-non-contiguous-regions.\n"), + stub_entry->group->stub_sec, + stub_entry->target_section); htab = ppc_hash_table (info); if (htab == NULL) @@ -11917,25 +11911,19 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (stub_entry->target_section != NULL && 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(); - } + info->callbacks->einfo (_("%F%P: Could not assign %pA to an output section. " + "Retry without --enable-non-contiguous-regions.\n"), + stub_entry->target_section); /* Same for the group. */ if (stub_entry->group->stub_sec != NULL && stub_entry->group->stub_sec->output_section == NULL && info->non_contiguous_regions) - { - _bfd_error_handler (_("Could not assign group %pA target %pA to an " - "output section. Retry without " - "--enable-non-contiguous-regions.\n"), - stub_entry->group->stub_sec, - stub_entry->target_section); - abort(); - } + info->callbacks->einfo (_("%F%P: Could not assign group %pA target %pA to an " + "output section. Retry without " + "--enable-non-contiguous-regions.\n"), + stub_entry->group->stub_sec, + stub_entry->target_section); /* Make a note of the offset within the stubs for this entry. */ stub_entry->stub_offset = stub_entry->group->stub_sec->size; |