diff options
Diffstat (limited to 'ld/ldctor.c')
-rw-r--r-- | ld/ldctor.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ld/ldctor.c b/ld/ldctor.c index 2075ad3..505702a 100644 --- a/ld/ldctor.c +++ b/ld/ldctor.c @@ -290,10 +290,17 @@ ldctor_build_sets (void) p->reloc); if (howto == NULL) { - einfo (_("%P%X: %s does not support reloc %s for set %s\n"), - bfd_get_target (p->elements->section->owner), - bfd_get_reloc_code_name (p->reloc), - p->h->root.string); + /* See PR 20911 for a reproducer. */ + if (p->elements->section->owner == NULL) + einfo (_("%P%X: Special section %s does not support reloc %s for set %s\n"), + bfd_get_section_name (link_info.output_bfd, p->elements->section), + bfd_get_reloc_code_name (p->reloc), + p->h->root.string); + else + einfo (_("%P%X: %s does not support reloc %s for set %s\n"), + bfd_get_target (p->elements->section->owner), + bfd_get_reloc_code_name (p->reloc), + p->h->root.string); continue; } } |