This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

proposal: LD_PRELOAD for a specific library


the problem:
I'm working on a project where I want to change the behaviour of all applications which use OpenGL (= which load To change the bahaviour, I simply load my library first and overwrite dlopen, dlsym and the target functions. If you set the LD_PRELOAD enviroment variable on login, it may be changed so that the subprocesses don't load the library anymore. If you change the config file for preloading (/etc/ my library gets loaded into every process, not only the proccesses with OpenGL (applies the first method, too), which works but is bad. The only option is the set LD_PRELOAD manually.

a solution:
A new config file and or an enviroment variable which tells and dlopen to load a library exactly before loading a target library. If the target library is not loaded by the executable then no action should be performed. The behaviour should be similar to LD_PRELOAD. Furthermore dlsym must not return the address of the function of the target library but the address of the function of the preloaded library, if the symbol exists in the preloaded library.

I'd like to work on this but I want to hear your input first.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]