Author: kib
Date: Mon Jun  3 15:23:37 2019
New Revision: 348536
URL: https://svnweb.freebsd.org/changeset/base/348536

Log:
  Remove dead check.
  
  We already handled the case when symstrindex < 0 at line 680.
  
  Reported by:  danfe using PVS-studio
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

Modified:
  head/sys/kern/link_elf_obj.c

Modified: head/sys/kern/link_elf_obj.c
==============================================================================
--- head/sys/kern/link_elf_obj.c        Mon Jun  3 15:23:21 2019        
(r348535)
+++ head/sys/kern/link_elf_obj.c        Mon Jun  3 15:23:37 2019        
(r348536)
@@ -714,11 +714,6 @@ link_elf_load_file(linker_class_t cls, const char *fil
                goto out;
        }
 
-       if (symstrindex == -1) {
-               link_elf_error(filename, "lost symbol string index");
-               error = ENOEXEC;
-               goto out;
-       }
        /* Allocate space for and load the symbol strings */
        ef->ddbstrcnt = shdr[symstrindex].sh_size;
        ef->ddbstrtab = malloc(shdr[symstrindex].sh_size, M_LINKER, M_WAITOK);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to