aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cddl/contrib/opensolaris/cmd')
-rw-r--r--cddl/contrib/opensolaris/cmd/lockstat/sym.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/cddl/contrib/opensolaris/cmd/lockstat/sym.c b/cddl/contrib/opensolaris/cmd/lockstat/sym.c
index f3feb549c477..e668b54ee5b3 100644
--- a/cddl/contrib/opensolaris/cmd/lockstat/sym.c
+++ b/cddl/contrib/opensolaris/cmd/lockstat/sym.c
@@ -194,33 +194,9 @@ symtab_init(void)
return (-1);
#endif
-#ifdef illumos
(void) elf_version(EV_CURRENT);
elf = elf_begin(fd, ELF_C_READ, NULL);
-#else
- /*
- * XXX - libelf needs to be fixed so it will work with
- * non 'ordinary' files like /dev/ksyms. The following
- * is a work around for now.
- */
- if (elf_version(EV_CURRENT) == EV_NONE) {
- close(fd);
- return (-1);
- }
- if (ioctl(fd, KIOCGSIZE, &sz) < 0) {
- close(fd);
- return (-1);
- }
- if (ioctl(fd, KIOCGADDR, &ksyms) < 0) {
- close(fd);
- return (-1);
- }
- if ((elf = elf_memory(ksyms, sz)) == NULL) {
- close(fd);
- return (-1);
- }
-#endif
for (cnt = 1; (scn = elf_nextscn(elf, scn)) != NULL; cnt++) {
Shdr *shdr = elf_getshdr(scn);