This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: i386: Problems with references to import symbols.


Richard Henderson <rth@redhat.com> wrote on 21.03.2007 17:09:26:

> On Wed, Mar 21, 2007 at 01:11:36PM +0100, Kai Tietz wrote:
> > #include <stdlib.h>
> > 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__malloc". But the import library has also the not 
> > decored name stub function "_malloc". Did I something wrong or is 
there 
> > something broken ?
> 
> In i386_pe_mark_dllimport, we turn "malloc" into "*__imp_malloc",
> and the later is not constant.  I expect we'd have to expand this
> differently if you wanted to make use of import library stubs.

The problem I want to compile boehm-gc and libobjc which use this kind of 
variable initialization. Currently these parts not compilable for mingw 
targets.

Regards,
 i.A. Kai Tietz

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-StraÃe 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  KomplementÃrin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-StraÃe 9 â 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - GeschÃftsfÃhrer: 
Ulrike DÃhler, Manuela Kluger


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