Click to See Complete Forum and Search --> : question: call I call _dl_open directly? why "segmentation fault" come out?


feny_lf
06-16-2006, 02:44 AM
Hi
Here's a problem I met during the implementation of injectso in Linux.

I "ptrace attach"ed the target process, then find the symbol "_dl_open" address in the target process. but failed when I tried to make a call of "_dl_open" in target process.

at last, as a test, I made another C file, which only called _dl_open(...) directly.
then compiled it and ran it. but the result is "segmentation fault".

why can't I call _dl_open in my simple program? is there any limitation to call one internal_function?

thanks
-f

feny_lf
06-16-2006, 02:46 AM
Hi
Here's a problem I met during the implementation of injectso in Linux.

I "ptrace attach"ed the target process, then find the symbol "_dl_open" address in the target process. but failed when I tried to make a call of "_dl_open" in target process.

at last, as a test, I made another C file, which only called _dl_open(...) directly.
then compiled it and ran it. but the result is "segmentation fault".

why can't I call _dl_open in my simple program? is there any limitation to call one internal_function?

thanks
-f

Parcival
06-16-2006, 03:24 AM
No double posting please.