diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2001-11-14 18:48:26 +0000 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2001-11-14 18:48:26 +0000 |
commit | 27018c3f6862711768dd744fc092752aa8864489 (patch) | |
tree | 0f82eb61a6a9820e6c69b4fdb8c384805ae0810f /bfd/elf64-s390.c | |
parent | befc81ac1d52695f97ae20211a6f2fa7944e602a (diff) | |
download | fsf-binutils-gdb-27018c3f6862711768dd744fc092752aa8864489.zip fsf-binutils-gdb-27018c3f6862711768dd744fc092752aa8864489.tar.gz fsf-binutils-gdb-27018c3f6862711768dd744fc092752aa8864489.tar.bz2 |
* elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
scheme to get rid of an ugly complicated test.
* elf64-s390.c (elf_s390_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf64-s390.c')
-rw-r--r-- | bfd/elf64-s390.c | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index e0a18cd..f4c1075 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -1658,52 +1658,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section, || h->root.type == bfd_link_hash_defweak) { sec = h->root.u.def.section; - if (r_type == R_390_GOTPC - || r_type == R_390_GOTPCDBL - || ((r_type == R_390_PLT16DBL - || r_type == R_390_PLT32 - || r_type == R_390_PLT32DBL - || r_type == R_390_PLT64) - && htab->splt != NULL - && h->plt.offset != (bfd_vma) -1) - || ((r_type == R_390_GOT12 - || r_type == R_390_GOT16 - || r_type == R_390_GOT32 - || r_type == R_390_GOT64 - || r_type == R_390_GOTENT) - && elf_hash_table (info)->dynamic_sections_created - && (! info->shared - || (! info->symbolic && h->dynindx != -1) - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0)) - || (info->shared - && ((! info->symbolic && h->dynindx != -1) - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0) - && (r_type == R_390_8 - || r_type == R_390_16 - || r_type == R_390_32 - || r_type == R_390_64 - || r_type == R_390_PC16 - || r_type == R_390_PC16DBL - || r_type == R_390_PC32 - || r_type == R_390_PC32DBL - || r_type == R_390_PC64) - && ((input_section->flags & SEC_ALLOC) != 0 - /* DWARF will emit R_390_32 relocations in its - sections against symbols defined externally - in shared libraries. We can't do anything - with them here. */ - || ((input_section->flags & SEC_DEBUGGING) != 0 - && (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_DYNAMIC) != 0)))) - { - /* In these cases, we don't need the relocation - value. We check specially because in some - obscure cases sec->output_section will be NULL. */ - relocation = 0; - } - else if (sec->output_section == NULL) + if (sec->output_section == NULL) { /* Set a flag that will be cleared later if we find a relocation value for this symbol. output_section @@ -1973,7 +1928,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section, { relocate = false; outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); - outrel.r_addend = relocation + rel->r_addend; + outrel.r_addend = rel->r_addend; } else { |