Import latest fixes to libiberty from GCC
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 1 Sep 2017 13:14:39 +0000 (06:14 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 1 Sep 2017 13:14:39 +0000 (06:14 -0700)
Fix warning for simple-object-elf.c.

2017-09-01  Martin Liska  <mliska@suse.cz>

* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
Remove duplicite declaration.

libiberty/ChangeLog
libiberty/simple-object-elf.c

index 191a311..8c46971 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-01  Martin Liska  <mliska@suse.cz>
+
+       * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
+       Remove duplicite declaration.
+
 2017-08-31  Richard Biener  <rguenther@suse.de>
 
        PR lto/81968
index 9799e72..6774eb2 100644 (file)
@@ -587,11 +587,6 @@ simple_object_elf_find_sections (simple_object_read *sobj,
 
   /* Read the section names.  */
 
-  if (eor->shstrndx == 0)
-    {
-      XDELETEVEC (shdrs);
-      return "ELF section header string table missing";
-    }
   shstrhdr = shdrs + (eor->shstrndx - 1) * shdr_size;
   name_size = ELF_FETCH_FIELD (type_functions, ei_class, Shdr,
                               shstrhdr, sh_size, Elf_Addr);
@@ -1237,7 +1232,6 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj,
       off_t offset;
       off_t length;
       int ret;
-      const char *errmsg;
       simple_object_write_section *dest;
       off_t flags;
       unsigned char *buf;