I am trying to get the address of a private function in GLIBC.
For instance - the function
I have done it with gdb, using
info symbol __run_prefork_handlers and
info address __run_prefork_handlers
And I get the relevant information (relevant so) and address of the function.
I tried to get the address of this function programmatically using
Since glibc is loaded by runtime loader at startup I call
dlsym(RTLD_GLOBAL, "__run_prefork_handlers") without first calling
I get a
NULL pointer and perror returns:
undefined symbol: __run_prefork_handlers
Running the same code for symbol of an exported function such as
fork works well.
Which steps should I take to get this information within a program?