aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2025-10-15 17:07:22 -0400
committerJohn David Anglin <danglin@gcc.gnu.org>2025-10-15 17:07:22 -0400
commitf47d2570a73c8d0f58f07f07c6e9ffd8fc8a95bd (patch)
tree0cf98e8be9d3c754e831f55b382e2d769a73862d
parentb6753354fbbe7c2c66ae9f452ba7aa049db0fe0c (diff)
downloadbinutils-f47d2570a73c8d0f58f07f07c6e9ffd8fc8a95bd.zip
binutils-f47d2570a73c8d0f58f07f07c6e9ffd8fc8a95bd.tar.gz
binutils-f47d2570a73c8d0f58f07f07c6e9ffd8fc8a95bd.tar.bz2
hppa64: Remove a couple of unnecessary NULL pointer checks
2025-10-15 John David Anglin <danglin@gcc.gnu.org> bfd/ChangeLog: * elf64-hppa.c (allocate_global_data_opd): Remove hh check. (elf64_hppa_finalize_dlt): Likewise.
-rw-r--r--bfd/elf64-hppa.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 74f59fa..6a63ce2 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -1079,7 +1079,7 @@ allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data)
struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh);
struct elf64_hppa_allocate_data *x = (struct elf64_hppa_allocate_data *)data;
- if (hh && hh->want_opd)
+ if (hh->want_opd)
{
/* We never need an opd entry for a symbol which is not
defined by this output file. */
@@ -2230,11 +2230,7 @@ elf64_hppa_finalize_dlt (struct elf_link_hash_entry *eh, void *data)
sdlt = hppa_info->dlt_sec;
sdltrel = hppa_info->dlt_rel_sec;
- /* H/DYN_H may refer to a local variable and we know it's
- address, so there is no need to create a relocation. Just install
- the proper value into the DLT, note this shortcut can not be
- skipped when building a shared library. */
- if (! bfd_link_pic (info) && hh && hh->want_dlt)
+ if (! bfd_link_pic (info) && hh->want_dlt)
{
bfd_vma value;