aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-s390.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-s390.c')
-rw-r--r--bfd/elf64-s390.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 259ad13..e758d08 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -2276,9 +2276,6 @@ elf_s390_relocate_section (bfd *output_bfd,
|| SYMBOL_REFERENCES_LOCAL (info, h)
|| resolved_to_zero)
{
- Elf_Internal_Sym *isym;
- asection *sym_sec;
-
/* 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
@@ -2318,16 +2315,13 @@ 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
- && !(isym->st_value & 1)
- && (sym_sec = bfd_section_from_elf_index (input_bfd,
- isym->st_shndx))
- && sym_sec->alignment_power)
+ && !((h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset) & 1))
{
unsigned short new_insn =
(0xc000 | (bfd_get_8 (input_bfd,
@@ -3204,13 +3198,14 @@ elf_s390_relocate_section (bfd *output_bfd,
_bfd_error_handler
/* xgettext:c-format */
(_("%pB(%pA+%#" PRIx64 "): "
- "misaligned symbol `%s' (%#" PRIx64 ") for relocation %s"),
+ "relocation %s against misaligned symbol `%s' (%#" PRIx64 ") in %pB"),
input_bfd,
input_section,
(uint64_t) rel->r_offset,
+ howto->name,
h->root.root.string,
(uint64_t)relocation,
- howto->name);
+ sec->owner);
return false;
}