aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-10-04 17:04:59 +0930
committerAlan Modra <amodra@gmail.com>2024-10-04 17:47:21 +0930
commit6e40f9bb31be2f3656df97a1fcba4d6a30081e24 (patch)
tree7d226a4f059e7f80daf317881b6af7c7847a5aae /bfd/elf.c
parent0c13ac533e59589793ee6c8045cff98663f3ea85 (diff)
downloadgdb-6e40f9bb31be2f3656df97a1fcba4d6a30081e24.zip
gdb-6e40f9bb31be2f3656df97a1fcba4d6a30081e24.tar.gz
gdb-6e40f9bb31be2f3656df97a1fcba4d6a30081e24.tar.bz2
is_target_special_symbol fixes for commit 68bbe1183379
* elf.c (_bfd_elf_is_local_label_name): Don't segv on NULL name. * elf32-v850.c (v850_elf_is_local_label_name): Likewise. * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Likewise.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 39ee641..4012d99 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9725,6 +9725,9 @@ bool
_bfd_elf_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
const char *name)
{
+ if (!name)
+ return false;
+
/* Normal local symbols start with ``.L''. */
if (name[0] == '.' && name[1] == 'L')
return true;