Index: config/i386/i386.h =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/config/i386/i386.h,v retrieving revision 1.307 diff -c -3 -p -r1.307 i386.h *** config/i386/i386.h 21 Nov 2002 22:54:20 -0000 1.307 --- config/i386/i386.h 27 Nov 2002 19:23:34 -0000 *************** enum fp_cw_mode {FP_CW_STORED, FP_CW_UNI *** 3444,3449 **** --- 3444,3452 ---- #define MACHINE_DEPENDENT_REORG(X) x86_machine_dependent_reorg(X) + + #define DLL_IMPORT_EXPORT_PREFIX '@' + /* Local variables: version-control: t Index: config/i386/winnt.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/config/i386/winnt.c,v retrieving revision 1.36 diff -c -3 -p -r1.36 winnt.c *** config/i386/winnt.c 19 Sep 2002 13:51:23 -0000 1.36 --- config/i386/winnt.c 27 Nov 2002 19:23:34 -0000 *************** int *** 199,205 **** i386_pe_dllexport_name_p (symbol) const char *symbol; { ! return symbol[0] == '@' && symbol[1] == 'e' && symbol[2] == '.'; } /* Return nonzero if SYMBOL is marked as being dllimport'd. */ --- 199,206 ---- i386_pe_dllexport_name_p (symbol) const char *symbol; { ! return symbol[0] == DLL_IMPORT_EXPORT_PREFIX ! && symbol[1] == 'e' && symbol[2] == '.'; } /* Return nonzero if SYMBOL is marked as being dllimport'd. */ *************** int *** 208,214 **** i386_pe_dllimport_name_p (symbol) const char *symbol; { ! return symbol[0] == '@' && symbol[1] == 'i' && symbol[2] == '.'; } /* Mark a DECL as being dllexport'd. --- 209,216 ---- i386_pe_dllimport_name_p (symbol) const char *symbol; { ! return symbol[0] == DLL_IMPORT_EXPORT_PREFIX ! && symbol[1] == 'i' && symbol[2] == '.'; } /* Mark a DECL as being dllexport'd. *************** i386_pe_mark_dllexport (decl) *** 237,243 **** return; /* already done */ newname = alloca (strlen (oldname) + 4); ! sprintf (newname, "@e.%s", oldname); /* We pass newname through get_identifier to ensure it has a unique address. RTL processing can sometimes peek inside the symbol ref --- 239,245 ---- return; /* already done */ newname = alloca (strlen (oldname) + 4); ! sprintf (newname, "%ce.%s", DLL_IMPORT_EXPORT_PREFIX, oldname); /* We pass newname through get_identifier to ensure it has a unique address. RTL processing can sometimes peek inside the symbol ref *************** i386_pe_mark_dllimport (decl) *** 312,318 **** } newname = alloca (strlen (oldname) + 11); ! sprintf (newname, "@i._imp__%s", oldname); /* We pass newname through get_identifier to ensure it has a unique address. RTL processing can sometimes peek inside the symbol ref --- 314,320 ---- } newname = alloca (strlen (oldname) + 11); ! sprintf (newname, "%ci._imp__%s", DLL_IMPORT_EXPORT_PREFIX, oldname); /* We pass newname through get_identifier to ensure it has a unique address. RTL processing can sometimes peek inside the symbol ref *************** i386_pe_encode_section_info (decl, first *** 399,406 **** i386_pe_mark_dllimport (decl); /* It might be that DECL has already been marked as dllimport, but a subsequent definition nullified that. The attribute is gone but ! DECL_RTL still has @i._imp__foo. We need to remove that. Ditto ! for the DECL_NON_ADDR_CONST_P flag. */ else if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL) && DECL_RTL (decl) != NULL_RTX --- 401,408 ---- i386_pe_mark_dllimport (decl); /* It might be that DECL has already been marked as dllimport, but a subsequent definition nullified that. The attribute is gone but ! DECL_RTL still has (DLL_IMPORT_EXPORT_PREFIX)i._imp__foo. We need ! to remove that. Ditto for the DECL_NON_ADDR_CONST_P flag. */ else if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL) && DECL_RTL (decl) != NULL_RTX *************** const char * *** 428,434 **** i386_pe_strip_name_encoding (str) const char *str; { ! if (*str == '@') str += 3; if (*str == '*') str += 1; --- 430,436 ---- i386_pe_strip_name_encoding (str) const char *str; { ! if (*str == DLL_IMPORT_EXPORT_PREFIX) str += 3; if (*str == '*') str += 1;