mcctrl: lookup unexported symbols at runtime
Instead of parsing System.map, use kallsyms_lookup_name() to get unexported symbols addresses at module loading time. This lets mckernel work with kaslr enabled (it gets enabled by default from el7.5 onwards) Change-Id: Ie4349fc1145ebce44f37f1f40c16f9d75584074d
This commit is contained in:
committed by
Masamichi Takagi
parent
794684985f
commit
e8f8660b73
@@ -892,16 +892,6 @@ out:
|
||||
return error;
|
||||
} /* read_long() */
|
||||
|
||||
#ifdef MCCTRL_KSYM_sys_readlink
|
||||
static ssize_t (*mcctrl_sys_readlink)(const char *path, char *buf,
|
||||
size_t bufsiz)
|
||||
#if MCCTRL_KSYM_sys_readlink
|
||||
= (void *)MCCTRL_KSYM_sys_readlink;
|
||||
#else
|
||||
= &sys_readlink;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static int read_link(char *buf, size_t bufsize, char *fmt, ...)
|
||||
{
|
||||
int error;
|
||||
|
||||
Reference in New Issue
Block a user