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 <jremus@linux.ibm.com>
This commit is contained in:
Jens Remus
2025-05-19 11:16:53 +02:00
parent ed53e990e5
commit c5c2cb6d7d

View File

@@ -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