Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jun 2019 15:23:37 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348536 - head/sys/kern
Message-ID:  <201906031523.x53FNbr3072068@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906031523.x53FNbr3072068>