From mboxrd@z Thu Jan 1 00:00:00 1970 From: DJ Delorie To: cwilson@ece.gatech.edu Cc: binutils@sources.redhat.com, cygwin@cygwin.com Subject: Re: [aida_s@mx12.freecom.ne.jp: A serious bug of "ld --enable-auto-import"] Date: Sun, 26 Aug 2001 08:43:00 -0000 Message-id: <200108261543.LAA06415@envy.delorie.com> References: <3B8884F6.80708@ece.gatech.edu> <200108260530.BAA28221@envy.delorie.com> <3B888D76.6090102@ece.gatech.edu> <200108260613.CAA28557@envy.delorie.com> <3B891172.9000207@ece.gatech.edu> X-SW-Source: 2001-08/msg00611.html > Urk. I love these types of comments ;-) > Here's what hello.o looks like when hello.c uses > __declspec(dllimport) (and hwstr.c uses __declspec(dllexport)). > Recall that this configuration works as expected. Right, because we're effectively telling gcc that hwstr1 is a pointer, not an array. That changes how gcc generates code. Pointers must be indexed at runtime, arrays may be indexed at compile time.