bfd_section_* macros
[deliverable/binutils-gdb.git] / bfd / elf32-metag.c
index 7f96246e5dd08ddef2c1d1da3c56522c317fc310..e3df8c56843bf83d4e65b78cd25fd93c39651b70 100644 (file)
@@ -1,5 +1,5 @@
 /* Meta support for 32-bit ELF
-   Copyright (C) 2013-2018 Free Software Foundation, Inc.
+   Copyright (C) 2013-2019 Free Software Foundation, Inc.
    Contributed by Imagination Technologies Ltd.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1519,7 +1519,7 @@ elf_metag_relocate_section (bfd *output_bfd,
 
          name = bfd_elf_string_from_elf_section
            (input_bfd, symtab_hdr->sh_link, sym->st_name);
-         name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
+         name = name == NULL ? bfd_section_name (sec) : name;
        }
       else
        {
@@ -2374,9 +2374,7 @@ elf_metag_check_relocs (bfd *abfd,
          /* This relocation describes which C++ vtable entries are actually
             used.  Record for later use during GC.  */
        case R_METAG_GNU_VTENTRY:
-         BFD_ASSERT (hh != NULL);
-         if (hh != NULL
-             && !bfd_elf_gc_record_vtentry (abfd, sec, &hh->eh, rel->r_addend))
+         if (!bfd_elf_gc_record_vtentry (abfd, sec, &hh->eh, rel->r_addend))
            return FALSE;
          break;
        }
@@ -2936,7 +2934,7 @@ elf_metag_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->etab.srelplt)
            relocs = TRUE;
This page took 0.025034 seconds and 4 git commands to generate.