Inject a shared library or DLL into a running process in Linux

How Do i Inject a shared library or DLL into a running process in Linux

i,e into the process address space ?Inject a shared library or DLL into a running process in Linux

I am using Mandriva 10.1 Linux ,

please help me out

Reply to
manu
Loading thread data ...

If you need to post in multiple groups, please crosspost instead of posting to each group separately.

What is the need for injecting the shared libraries without the process doing it by itself?

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio

Reply to
manu

Once again: WHY?

Which is the problem you think to solve with this kind of operation?

Are you attempting to change a shared library which the process is already using?

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio

I assume that you are referring to dynamic loading. Take a look at the dlopen and dlsym functions.

Paul

Reply to
Paul Keinanen

I dont know of any possibility of doing something like this during runtime. I think this should be hardly necessary anyway.

Have a look at LD_PRELOAD, if you intend to change the behaviour of standrad library functions, this should be sufficient.

If not you need to post further details of what you are trying to do.

Sven

--
Software patents are the software project equivalent of land mines: Each
design decision carries a risk of stepping on a patent, which can destroy
your project. (Richard M. Stallman)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web
Reply to
Sven Geggus

This is how I understood the Question of the OP as well.

Something like this can be achieved using LD_PRELOAD in conjunction with an external mechanism (shares memory comes to mind) to change the behaviour of a given funktion.

Sven

--
Kernel panic: I have no root and I want to scream
(Linux Kernel Error Message)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web
Reply to
Sven Geggus

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.