binutils/binutils-verdef.patch
Nick Clifton 240a18b49e Do not set version info on unversion symbols.
Resolves: RHEL-22601
2024-01-25 11:56:59 +00:00

13 lines
538 B
Diff

--- binutils.orig/bfd/elflink.c 2024-01-25 11:04:09.991925976 +0000
+++ binutils-2.35.2/bfd/elflink.c 2024-01-25 11:04:18.164921403 +0000
@@ -4913,7 +4913,8 @@ elf_link_add_object_symbols (bfd *abfd,
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (elf_tdata (abfd)->verdef != NULL
+ if (h->versioned != unversioned
+ && elf_tdata (abfd)->verdef != NULL
&& vernum > 1
&& definition)
h->verinfo.verdef = &elf_tdata (abfd)->verdef[vernum - 1];