6 * Finds a given address in the System.map and prints it out
7 * with its neighbors. -- Cort
10 int main(int argc, char **argv)
12 unsigned long addr, cmp, i;
14 char s[256], last[256];
18 fprintf(stderr, "Usage: %s <address>\n", argv[0]);
22 for ( i = 1 ; argv[i] ; i++ )
24 sscanf( argv[i], "%0lx", &addr );
25 /* adjust if addr is relative to kernelbase */
26 if ( addr < PAGE_OFFSET )
29 if ( (f = fopen( "System.map", "r" )) == NULL )
38 sscanf( s, "%0lx", &cmp );
44 printf( "%s%s", last, s );