[committed] hppa64: Fix bogus warning from elf_hppa_final_link_relocate
John David Anglin
dave.anglin@bell.net
Tue Nov 25 02:40:10 GMT 2025
Some compiler versions think the opd_off variable may be used uninitialized.
It's not really as the initialization and use occur in blocks with the
same conditions (eh == NULL && r_type == R_PARISC_LTOFF_FPTR64).
Dave
---
hppa64: Fix bogus warning from elf_hppa_final_link_relocate
2025-11-24 John David Anglin <danglin@gcc.gnu.org>
bfd/ChangeLog:
* elf64-hppa.c (elf_hppa_final_link_relocate): Initialize opd_off.
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 8d3a8878aa0..befe6fc3a5b 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -3678,7 +3678,8 @@ elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
{
bfd_vma relocation = value;
bfd_vma *local_opd_offsets, *local_dlt_offsets;
- bfd_vma dlt_off, opd_off;
+ bfd_vma dlt_off;
+ bfd_vma opd_off = (bfd_vma) -1;
if (eh == NULL)
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20251124/5252b798/attachment.sig>
More information about the Binutils
mailing list