move all the necessay code inside ifdef
This commit is contained in:
parent
b02f1063c3
commit
a18b60aecf
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: elf32.c,v 1.9 2011/02/05 13:32:32 yamt Exp $ */
|
||||
/* $NetBSD: elf32.c,v 1.10 2013/10/19 17:10:17 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
@ -65,7 +65,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if !defined(lint)
|
||||
__RCSID("$NetBSD: elf32.c,v 1.9 2011/02/05 13:32:32 yamt Exp $");
|
||||
__RCSID("$NetBSD: elf32.c,v 1.10 2013/10/19 17:10:17 christos Exp $");
|
||||
#endif
|
||||
|
||||
#ifndef ELFSIZE
|
||||
@ -166,9 +166,8 @@ NAME(loadsym)(int fd)
|
||||
int
|
||||
NAME(findsym)(findsym_t find, char *name, uintptr_t *start, uintptr_t *end)
|
||||
{
|
||||
static int lastptr[FIND_MAX];
|
||||
uintptr_t sa, ea;
|
||||
int i, rv, off;
|
||||
int i, off;
|
||||
Elf_Byte st;
|
||||
|
||||
switch (find) {
|
||||
@ -184,9 +183,9 @@ NAME(findsym)(findsym_t find, char *name, uintptr_t *start, uintptr_t *end)
|
||||
return -1;
|
||||
}
|
||||
|
||||
rv = -1;
|
||||
|
||||
#ifdef dump_core
|
||||
static int lastptr[FIND_MAX];
|
||||
for (i = lastptr[find];;) {
|
||||
#else
|
||||
for (i = 0; i < nsyms; i++) {
|
||||
@ -239,6 +238,8 @@ NAME(findsym)(findsym_t find, char *name, uintptr_t *start, uintptr_t *end)
|
||||
return -1;
|
||||
|
||||
found:
|
||||
#ifdef dump_core
|
||||
lastptr[find] = i;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user