[Top][All Lists]   Re: [patch #6448] [MSVC 7/7] Add MSVC Support
From: Brian Dessent Subject: Re: [patch #6448] [MSVC 7/7] Add
MSVC Support Date: Mon, 11 Aug 2008 17:35:56 -0700  Ralf
Wildenhues wrote:  > Oh well; if somebody digs out the auto-
import semantics from the list > archives/manuals, feel free to
add a note to so that the next > person won't be confused again.
(Extra score for putting it in the new > w32 chapter.  ;-)  The
first issue here is that the auto-import mechanism requires that
the reference to the imported data item be in a writable
section, because it tricks the OS loader into making the fixup
to the data address as if it were fixing up an address of a
dllimported function call.  The second issue is whether
--enable-auto-import was specified to the linker.  This is a
tri-state setting:  (A) If --disable-auto-import is specified,
no auto-import functionality is attempted and link errors will
result unless __declspec(dllimport) is used with all data
references.  (B) If --enable-auto-impor