Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can even do it in POSIX C with dlsym.


Heh, true, though it requires that the function you want to call be in a dynamic library.


I thought so too, but the man pages suggest that may not be a requirement.

Under Mac OS X, it looks like dlsym(RTLD_DEFAULT, "symbol") will look for the symbol anywhere.

Under Linux it looks like dlopen(NULL, flags) will open a handle to the main program which can be passed to dyslm's first argument.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: