aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-01-20 13:55:53 +1030
committerAlan Modra <amodra@gmail.com>2022-01-28 17:00:55 +1030
commit1004091634f2aca697dd01a77b72ca81e52d753e (patch)
tree80b8e572ae204cd568e499c1fe8214531a88cb19 /bfd
parentef5684c2bdf4d4f9975650e3b7b8f9b0ff98abee (diff)
downloadgdb-1004091634f2aca697dd01a77b72ca81e52d753e.zip
gdb-1004091634f2aca697dd01a77b72ca81e52d753e.tar.gz
gdb-1004091634f2aca697dd01a77b72ca81e52d753e.tar.bz2
PowerPC64 handling of @tocbase
* elf64-ppc.c (ppc64_elf_relocate_section): Warn if the symbol on R_PPC64_TOC isn't local.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/elf64-ppc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 8a8b83b..92f6d0a 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,