Only read kernel symbols from /proc/kallsyms if no System.map has been read
This commit is contained in:
parent
ade259a045
commit
017e328032
2
ksym.c
2
ksym.c
@ -132,7 +132,7 @@
|
|||||||
#define VERBOSE_DEBUGGING 0
|
#define VERBOSE_DEBUGGING 0
|
||||||
|
|
||||||
|
|
||||||
static int num_syms = 0;
|
int num_syms = 0;
|
||||||
static int i_am_paranoid = 0;
|
static int i_am_paranoid = 0;
|
||||||
static char vstring[12];
|
static char vstring[12];
|
||||||
static struct sym_table *sym_array = (struct sym_table *) 0;
|
static struct sym_table *sym_array = (struct sym_table *) 0;
|
||||||
|
@ -92,6 +92,10 @@
|
|||||||
* Mon May 28 16:46:59 CEST 2007: Martin Schulze <joey@infodrom.org>
|
* Mon May 28 16:46:59 CEST 2007: Martin Schulze <joey@infodrom.org>
|
||||||
* Since Linux 2.6 query_module is depricated and no implemented
|
* Since Linux 2.6 query_module is depricated and no implemented
|
||||||
* anymore. Thus, overhauled symbol import via /proc/kallsyms
|
* anymore. Thus, overhauled symbol import via /proc/kallsyms
|
||||||
|
*
|
||||||
|
* Thu May 31 12:12:23 CEST 2007: Martin Schulze <joey@infodrom.org>
|
||||||
|
* Only read kernel symbols from /proc/kallsyms if no System.map
|
||||||
|
* has been read as it may contain more symbols.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -137,6 +141,8 @@ static int AddSymbol(const char *);
|
|||||||
struct Module *AddModule(const char *);
|
struct Module *AddModule(const char *);
|
||||||
static int symsort(const void *, const void *);
|
static int symsort(const void *, const void *);
|
||||||
|
|
||||||
|
/* Imported from ksym.c */
|
||||||
|
extern int num_syms;
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Function: InitMsyms
|
* Function: InitMsyms
|
||||||
@ -188,6 +194,9 @@ extern int InitMsyms()
|
|||||||
|
|
||||||
while ( fgets(buf, sizeof(buf), ksyms) != NULL )
|
while ( fgets(buf, sizeof(buf), ksyms) != NULL )
|
||||||
{
|
{
|
||||||
|
if (num_syms > 0 && index(buf, '[') == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
p = index(buf, ' ');
|
p = index(buf, ' ');
|
||||||
|
|
||||||
if ( p == NULL )
|
if ( p == NULL )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user