From: Jens Remus Date: Mon, 19 May 2025 09:16:53 +0000 (+0200) Subject: s390: Simplify test for absolute symbol X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5c2cb6d7d92d4269c0e24bdfb7783fdddc94cfe;p=thirdparty%2Fbinutils-gdb.git s390: Simplify test for absolute symbol Simplify the test whether a symbol is absolute, by using the helper bfd_is_abs_symbol. bfd/ * elf64-s390.c (elf_s390_relocate_section): Use bfd_is_abs_symbol to test whether symbol is absolute. Signed-off-by: Jens Remus --- diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index 7964ec665b9..e758d087a61 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -2276,8 +2276,6 @@ elf_s390_relocate_section (bfd *output_bfd, || SYMBOL_REFERENCES_LOCAL (info, h) || resolved_to_zero) { - Elf_Internal_Sym *isym; - /* This is actually a static link, or it is a -Bsymbolic link and the symbol is defined locally, or the symbol was forced to be local @@ -2317,9 +2315,7 @@ elf_s390_relocate_section (bfd *output_bfd, & 0xff00f000) == 0xe300c000 && bfd_get_8 (input_bfd, contents + rel->r_offset + 3) == 0x04)) - && (isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - input_bfd, r_symndx)) - && isym->st_shndx != SHN_ABS + && !bfd_is_abs_symbol (&h->root) && h != htab->elf.hdynamic && h != htab->elf.hgot && h != htab->elf.hplt