Richard Henderson wrote
> On Wed, Mar 21, 2007 at 04:16:20PM -, Dave Korn wrote:
> > Presumably there would be no problem in just waiting
> until runtime to
> > initialise the my_malloc_hook variable dynamically instead
> of trying to
> > statically initialise it?
>
> Dunno. One could al
Richard Henderson writes:
>Dunno. One could also wait to expand *__imp_foo, for functions,
>until expanding the function call. And then this variable would
>receive the address of the import library thunk.
>
>What does VC++ do?
It seems to always use *__imp_foo except when initializing a static
On Wed, Mar 21, 2007 at 04:16:20PM -, Dave Korn wrote:
> Presumably there would be no problem in just waiting until runtime to
> initialise the my_malloc_hook variable dynamically instead of trying to
> statically initialise it?
Dunno. One could also wait to expand *__imp_foo, for functions
Richard Henderson <[EMAIL PROTECTED]> wrote on 21.03.2007 17:09:26:
> On Wed, Mar 21, 2007 at 01:11:36PM +0100, Kai Tietz wrote:
> > #include
> > void *(my_malloc_hook)(size_t) = malloc;
> >
> > GCC tells me, that malloc isn't a constant symbol. Clear malloc is
defined
> > by using the attribu
On 21 March 2007 16:09, Richard Henderson wrote:
> On Wed, Mar 21, 2007 at 01:11:36PM +0100, Kai Tietz wrote:
>> #include
>> void *(my_malloc_hook)(size_t) = malloc;
>>
>> GCC tells me, that malloc isn't a constant symbol. Clear malloc is defined
>> by using the attribute dllimport, because it c
On Wed, Mar 21, 2007 at 01:11:36PM +0100, Kai Tietz wrote:
> #include
> void *(my_malloc_hook)(size_t) = malloc;
>
> GCC tells me, that malloc isn't a constant symbol. Clear malloc is defined
> by using the attribute dllimport, because it comes out of the MSVCRT and
> has the name "__imp__mallo
Hello,
I stumbled over the following problem in current gcc trunk version for
minw32. If I try something like:
#include
void *(my_malloc_hook)(size_t) = malloc;
GCC tells me, that malloc isn't a constant symbol. Clear malloc is defined
by using the attribute dllimport, because it comes out of