add dlsym print to dummy
This commit is contained in:
parent
635cf023c7
commit
9bc3007a7f
1 changed files with 5 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#define _DEFAULT_SOURCE
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <dlfcn.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
|
|
@ -67,6 +68,10 @@ static void sigaction_handler(int signum, siginfo_t* info, void*)
|
|||
|
||||
int main()
|
||||
{
|
||||
// print some info about libc
|
||||
void* libc = dlopen("libc.so.6", RTLD_LOCAL);
|
||||
printf("libc syscall %p\n", dlsym(libc, "syscall"));
|
||||
|
||||
// lets install some signal handlers
|
||||
// for sigsegv and sig illegal instruction
|
||||
struct sigaction sa;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue