X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf64-s390.c;h=4ffcde92e212371e6ad8c4d21990276ae6a21c6d;hb=9b30da15e72bd4e8265169bfd511272aa3875738;hp=c2a2955b36bc521d68ec68353acb6f973cc09e09;hpb=e6213e09ed0ef6ee40d00981c38baac6964aa95b;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index c2a2955b36..4ffcde92e2 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -1,5 +1,5 @@ /* IBM S/390-specific support for 64-bit ELF - Copyright (C) 2000-2018 Free Software Foundation, Inc. + Copyright (C) 2000-2019 Free Software Foundation, Inc. Contributed Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of BFD, the Binary File Descriptor library. @@ -1301,9 +1301,7 @@ elf_s390_check_relocs (bfd *abfd, /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_390_GNU_VTENTRY: - BFD_ASSERT (h != NULL); - if (h != NULL - && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) + if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) return FALSE; break; @@ -1959,7 +1957,7 @@ elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Strip this section if we don't need it; see the comment below. */ } - else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela")) + else if (CONST_STRNEQ (bfd_section_name (s), ".rela")) { if (s->size != 0 && s != htab->elf.srelplt) relocs = TRUE; @@ -2119,7 +2117,11 @@ elf_s390_relocate_section (bfd *output_bfd, Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; - BFD_ASSERT (is_s390_elf (input_bfd)); + if (!is_s390_elf (input_bfd)) + { + bfd_set_error (bfd_error_wrong_format); + return FALSE; + } htab = elf_s390_hash_table (info); if (htab == NULL) @@ -3201,7 +3203,7 @@ elf_s390_relocate_section (bfd *output_bfd, if (name == NULL) return FALSE; if (*name == '\0') - name = bfd_section_name (input_bfd, sec); + name = bfd_section_name (sec); } if (r == bfd_reloc_overflow)