aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-10-20 17:13:31 +1030
committerAlan Modra <amodra@gmail.com>2024-10-20 17:15:53 +1030
commit32dc367249e85ecb2449d4be8cafc8e3fc2f359f (patch)
tree4845f6f58bea8a4374d17605865fb9cc3a7bdd5e /ld
parent17b145510f2d920ae3ae5d30a0d7f33f0db67c28 (diff)
downloadbinutils-32dc367249e85ecb2449d4be8cafc8e3fc2f359f.zip
binutils-32dc367249e85ecb2449d4be8cafc8e3fc2f359f.tar.gz
binutils-32dc367249e85ecb2449d4be8cafc8e3fc2f359f.tar.bz2
Report bfd_merge_sections error
PR 32260 bfd/ * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Default to bfd_generic_merge_sections when using the generic linker. * elflink.c (_bfd_elf_merge_sections): Return error from _bfd_merge_sections. Abort on wrong hash table. ld/ * ldlang.c (lang_process): Report bfd_merge_sections error.
Diffstat (limited to 'ld')
-rw-r--r--ld/ldlang.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 343c4de..00b2144 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -8426,7 +8426,8 @@ lang_process (void)
sections, so that GCed sections are not merged, but before
assigning dynamic symbols, since removing whole input sections
is hard then. */
- bfd_merge_sections (link_info.output_bfd, &link_info);
+ if (!bfd_merge_sections (link_info.output_bfd, &link_info))
+ einfo (_("%F%P: bfd_merge_sections failed: %E\n"));
/* Look for a text section and set the readonly attribute in it. */
found = bfd_get_section_by_name (link_info.output_bfd, ".text");