aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-04-14 17:22:33 +0930
committerAlan Modra <amodra@gmail.com>2021-04-14 17:26:15 +0930
commitc9f9a78d00d1a054c013da612949bbd6d1720ed7 (patch)
tree7e2aa80be71fa9701aa656d4936f7d999d472e02 /bfd/elf32-arm.c
parent13acb58d42e7c66d0d69240cc6b7a0fbf8290da4 (diff)
downloadgdb-c9f9a78d00d1a054c013da612949bbd6d1720ed7.zip
gdb-c9f9a78d00d1a054c013da612949bbd6d1720ed7.tar.gz
gdb-c9f9a78d00d1a054c013da612949bbd6d1720ed7.tar.bz2
PR27630, ubsan: elf32-arm.c:6587:20
PR 27630 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when hash might be NULL, cast instead.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 29656a7..81667ea 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -6582,8 +6582,9 @@ elf32_arm_size_stubs (bfd *output_bfd,
&& (r_type != (unsigned int) R_ARM_PLT32)
&& !((r_type == (unsigned int) R_ARM_TLS_CALL
|| r_type == (unsigned int) R_ARM_THM_TLS_CALL)
- && r_type == elf32_arm_tls_transition
- (info, r_type, &hash->root)
+ && r_type == (elf32_arm_tls_transition
+ (info, r_type,
+ (struct elf_link_hash_entry *) hash))
&& ((hash ? hash->tls_type
: (elf32_arm_local_got_tls_type
(input_bfd)[r_indx]))