From 51934e834520873c3eced04d1e18ba1c2dccc708 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 7 Jul 2008 16:02:32 +0000 Subject: [PATCH] * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols in the presence of a PLT. --- bfd/ChangeLog | 5 +++++ bfd/elf32-arm.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ef2ac33741..4b5843604e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2008-07-07 Christophe Lyon + + * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols in + the presence of a PLT. + 2008-07-07 Alan Modra * bfd.c (bfd_demangle): Always trim off bfd_get_symbol_leading_char. diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 2faefdf421..2ee0bb23b5 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -2777,7 +2777,7 @@ arm_type_of_stub (struct bfd_link_info *info, /* If the call will go through a PLT entry then we do not need glue. */ - if (globals->splt != NULL && hash->root.plt.offset != (bfd_vma) -1) + if (globals->splt != NULL && hash != NULL && hash->root.plt.offset != (bfd_vma) -1) return stub_type; if (r_type == R_ARM_THM_CALL) -- 2.11.0