Unix Programming - Re: Possible to do the equivalent of dlopen with an executable

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > July 2006 > Re: Possible to do the equivalent of dlopen with an executable





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Possible to do the equivalent of dlopen with an executable
Paul Pluzhnikov

2006-07-20, 1:23 pm

davids@webmaster.com writes:

> On Windows, DLLs and executables are almost identical....
>
> If you think about it, there's really no special reason they need to be
> different. They both need to be mapped and executed. They both contain
> functions that need to be exported (otherwise, how could a DLL call a
> function in the executable that called it?).


A DLL could easily call non-exported function from the main
executable -- all DLL needs is its address (which is often passed
as a "callback" parameter).

> It just so happens that on most UNIXes, they are very different.


With recent Linux "-pie" executables and "prelinked" DSOs, the
difference between ET_EXEC and ET_DYN is almost nil.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com