This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [aida_s@mx12.freecom.ne.jp: A serious bug of "ld --enable-auto-import"]
> 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.