Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Date: Fri, 27 Aug 1999 18:00:26 +0400 From: Paul Sokolovsky X-Mailer: The Bat! (v1.32) UNREG / CD5BF9353B3B7091 Reply-To: Paul Sokolovsky X-Priority: 3 (Normal) Message-ID: <4750.990827@is.lg.ua> To: Mumit Khan CC: cygwin AT sourceware DOT cygnus DOT com Subject: Re[6]: Importing a variable from a DLL In-reply-To: <199908270607.BAA19755@mercury.xraylith.wisc.edu> References: <199908270607 DOT BAA19755 AT mercury DOT xraylith DOT wisc DOT edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello Mumit, Mumit Khan wrote: MK> I'm currently adding changes to GCC so that exported data items have MK> the correct "data" tag in the .drectve section. This will enable us MK> to handle this in dlltool and dllwrap when the import libraries are MK> created. I'll hopefully test the gcc and dlltool changes this weekend MK> (it's pretty trivial). I also made mine, it requires changing only dlltool.c: (against b20 distribution) *** dlltool.c.org Tue Oct 27 03:04:10 1998 --- dlltool.c Thu Aug 26 22:31:32 1999 *************** *** 1144,1149 **** --- 1144,1150 ---- { asymbol *sym; const char *symbol_name; + int data; sym = bfd_minisymbol_to_symbol (abfd, false, from, store); if (sym == NULL) *************** *** 1153,1166 **** if (bfd_get_symbol_leading_char (abfd) == symbol_name[0]) ++symbol_name; ! def_exports (xstrdup (symbol_name) , 0, -1, 0, 0, 0); if (add_stdcall_alias && strchr (symbol_name, '@')) { char *exported_name = xstrdup (symbol_name); char *atsym = strchr (exported_name, '@'); *atsym = '\0'; ! def_exports (exported_name, xstrdup (symbol_name), -1, 0, 0, 0); } } } --- 1154,1171 ---- if (bfd_get_symbol_leading_char (abfd) == symbol_name[0]) ++symbol_name; ! /* Don't use bfd_decode_symclass() - remember, symbols with constant ! values dumped to code section */ ! data = !(sym->flags&BSF_FUNCTION); ! ! def_exports (xstrdup (symbol_name) , 0, -1, 0, 0, data); if (add_stdcall_alias && strchr (symbol_name, '@')) { char *exported_name = xstrdup (symbol_name); char *atsym = strchr (exported_name, '@'); *atsym = '\0'; ! def_exports (exported_name, xstrdup (symbol_name), -1, 0, 0, data); } } } MK> Now the import library will have what Paul suggests. MK> Regards, MK> Mumit Best regards, Paul mailto:paul-ml AT is DOT lg DOT ua -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com