I've the following situation and I'm not sure whether there's a solution within gcc/binutils capabilities. I'm trying to produce a single executable capable of running with a gui or as a console application. When it runs as a console application it shouldn't rely on any libraries having to do directly or indirectly with graphics. Here's the catch: in order to increase chances to run on all systems, the graphic library should be linked statically (e.g. I don't want the users having to have Qt installed). But some of the libraries Qt uses should be linked dynamically, as they are very system dependent (one example would be the openGL lib, but there're other cases). Is there a way to tell the rtld to be lazy and don't actually load and link certain shared libraries at startup (plus a way to tell it to finish the job once my code has determined it is safe to do so)? I know I can replace the default rtld with a modified version and use the interpreter field in the ELF header to call my version (and hopefully I'd be able to have that statically embedded in the executable, otherwise this way wouldn't help), but I'd like to check whether there was an easier way first. I don't think I can explicity load the shared libraries myself (using dlopen) because this would require to have stubs for all functions Qt uses (otherwise my executable would fail linking due to unresolved references from the statically linked Qt) TIA, Maurizio -- Maurizio Vitale Polymath Solutions