* PowerPC64 handling of @tocbase
@ 2022-01-28 6:30 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-01-28 6:30 UTC (permalink / raw)
To: binutils
* elf64-ppc.c (ppc64_elf_relocate_section): Warn if the symbol
on R_PPC64_TOC isn't local.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 8a8b83b283d..92f6d0a5d00 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -17027,6 +17027,15 @@ ppc64_elf_relocate_section (bfd *output_bfd,
relocation += htab->sec_info[sec->id].toc_off;
else
unresolved_reloc = true;
+ if (unresolved_reloc
+ || (!is_opd
+ && h != NULL
+ && !SYMBOL_REFERENCES_LOCAL (info, &h->elf)))
+ info->callbacks->einfo
+ /* xgettext:c-format */
+ (_("%H: %s against %pT is not supported\n"),
+ input_bfd, input_section, rel->r_offset,
+ ppc64_elf_howto_table[r_type]->name, sym_name);
goto dodyn;
/* TOC16 relocs. We want the offset relative to the TOC base,
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-28 6:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 6:30 PowerPC64 handling of @tocbase Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).