svn commit: r348536 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Mon Jun 3 15:23:38 UTC 2019
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);
More information about the svn-src-head
mailing list