Delay loaded shared objects

2009-11-30 Thread Robert Huo
Hi All,

I am not sure whether this is the right list. Please let me know if
there is a more appropriate list for this question.

Does gcc/g++ (on a typical Linux platform) supports delayed loaded
shared objects similar to the /DELAYLOAD option of MSVC [1]? The Win32
delay load implementation hides the LoadLibrary and GetProcAddress
logic from the programmer (those are similar calls to dlopen/dlsym on
Unix). Dependent DLLs are only loaded into library until the first
function in this library is called.

Many thanks,

Robert

[1] http://msdn.microsoft.com/en-us/library/151kt790.aspx


Re: Delay loaded shared objects

2009-12-01 Thread Robert Huo
On Tue, Dec 1, 2009 at 12:18 AM, Richard Henderson  wrote:
> On 11/30/2009 02:53 PM, Robert Huo wrote:
>>
>> Does gcc/g++ (on a typical Linux platform) supports delayed loaded
>> shared objects similar to the /DELAYLOAD option of MSVC [1]?
>
> No.
>
> The glibc elf.h file defines (and thus presumably reserves) the
> DF_P1_LAZYLOAD interface used on Solaris, but does not actually implement
> lazy loading in the glibc dynamic linker.  Nor does the binutils linker
> provide a mechanism for setting this bit.
>

Thanks for your answer.

Robert.