ubsan: z8k: index 10 out of bounds for type 'unsigned int const[10]'
[deliverable/binutils-gdb.git] / bfd / elf32-csky.c
index b3451b60b217720e9ce4bb5fcf0d1d34fd4812f0..04214f28ea5d606e1390e11401e17e623f95743a 100644 (file)
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for C-SKY.
-   Copyright (C) 1998-2019 Free Software Foundation, Inc.
+   Copyright (C) 1998-2020 Free Software Foundation, Inc.
    Contributed by C-SKY Microsystems and Mentor Graphics.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -28,6 +28,7 @@
 #include "opcode/csky.h"
 #include <assert.h>
 #include "libiberty.h"
+#include "elf32-csky.h"
 
 /* Data structures used for merging different arch variants.
    V1 (510/610) and V2 (8xx) processors are incompatible, but
@@ -2092,7 +2093,7 @@ csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
          if (htab->elf.hplt != NULL)
            strip_section = FALSE;
        }
-      else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rel") )
+      else if (CONST_STRNEQ (bfd_section_name (s), ".rel") )
        {
          if (s->size != 0 )
            relocs = TRUE;
@@ -5070,7 +5071,7 @@ csky_elf_relocate_section (bfd *                  output_bfd,
                  if (name == NULL)
                    break;
                  if (*name == '\0')
-                   name = bfd_section_name (input_bfd, sec);
+                   name = bfd_section_name (sec);
                }
              (*info->callbacks->reloc_overflow)
                (info,
This page took 0.025233 seconds and 4 git commands to generate.