From: Jens Remus Date: Fri, 14 Nov 2025 08:42:13 +0000 (+0100) Subject: s390: Check sreldynrelro in elf_s390_finish_dynamic_symbol X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a9d6a6a6007a3ef652397269c43e4b9afb40b40;p=thirdparty%2Fbinutils-gdb.git s390: Check sreldynrelro in elf_s390_finish_dynamic_symbol Add check for sreldynrelro being NULL, introduced by commit 5474d94f03ae ("dynrelro section for read-only dynamic symbols copied into executable") in elf32-s390.c function elf_s390_finish_dynamic_symbol, also to its elf64-s390.c counterpart. Found while inspecting and cleaning up differences between elf32-s390.c and elf64-s390.c. bfd/ * elf64-s390.c (elf_s390_finish_dynamic_symbol): Add sreldynrelro check from elf32-s390.c. Fixes: 5474d94f03ae ("dynrelro section for read-only dynamic symbols copied into executable") Signed-off-by: Jens Remus --- diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index f72df9f4e12..f5a80e73f11 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -3773,7 +3773,8 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, if (h->dynindx == -1 || (h->root.type != bfd_link_hash_defined && h->root.type != bfd_link_hash_defweak) - || htab->elf.srelbss == NULL) + || htab->elf.srelbss == NULL + || htab->elf.sreldynrelro == NULL) abort (); rela.r_offset = (h->root.u.def.value