Commit 249e6b63 by Casper S. Hornstrup Committed by Richard Henderson

i386.h (DLL_IMPORT_EXPORT_PREFIX): Define.

        * config/i386/i386.h (DLL_IMPORT_EXPORT_PREFIX): Define.
        * config/i386/winnt.c (i386_pe_dllexport_name_p): Use
        DLL_IMPORT_EXPORT_PREFIX, not '@'.
        (i386_pe_dllimport_name_p): Likewise.
        (i386_pe_mark_dllexport): Likewise.
        (i386_pe_mark_dllimport): Likewise.
        (i386_pe_encode_section_info): Likewise.
        (i386_pe_strip_name_encoding): Likewise.

From-SVN: r59580
parent 5a5c00af
2002-11-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
* config/i386/i386.h (DLL_IMPORT_EXPORT_PREFIX): Define.
* config/i386/winnt.c (i386_pe_dllexport_name_p): Use
DLL_IMPORT_EXPORT_PREFIX, not '@'.
(i386_pe_dllimport_name_p): Likewise.
(i386_pe_mark_dllexport): Likewise.
(i386_pe_mark_dllimport): Likewise.
(i386_pe_encode_section_info): Likewise.
(i386_pe_strip_name_encoding): Likewise.
2002-11-27 Richard Henderson <rth@redhat.com>
* mkmap-symver.awk (BEGIN): Set sawsymbol false.
......
......@@ -3444,6 +3444,9 @@ enum fp_cw_mode {FP_CW_STORED, FP_CW_UNINITIALIZED, FP_CW_ANY};
#define MACHINE_DEPENDENT_REORG(X) x86_machine_dependent_reorg(X)
#define DLL_IMPORT_EXPORT_PREFIX '@'
/*
Local variables:
version-control: t
......
......@@ -199,7 +199,8 @@ int
i386_pe_dllexport_name_p (symbol)
const char *symbol;
{
return symbol[0] == '@' && symbol[1] == 'e' && symbol[2] == '.';
return symbol[0] == DLL_IMPORT_EXPORT_PREFIX
&& symbol[1] == 'e' && symbol[2] == '.';
}
/* Return nonzero if SYMBOL is marked as being dllimport'd. */
......@@ -208,7 +209,8 @@ int
i386_pe_dllimport_name_p (symbol)
const char *symbol;
{
return symbol[0] == '@' && symbol[1] == 'i' && symbol[2] == '.';
return symbol[0] == DLL_IMPORT_EXPORT_PREFIX
&& symbol[1] == 'i' && symbol[2] == '.';
}
/* Mark a DECL as being dllexport'd.
......@@ -237,7 +239,7 @@ i386_pe_mark_dllexport (decl)
return; /* already done */
newname = alloca (strlen (oldname) + 4);
sprintf (newname, "@e.%s", oldname);
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
......@@ -312,7 +314,7 @@ i386_pe_mark_dllimport (decl)
}
newname = alloca (strlen (oldname) + 11);
sprintf (newname, "@i._imp__%s", oldname);
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
......@@ -399,8 +401,8 @@ i386_pe_encode_section_info (decl, first)
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. */
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
......@@ -428,7 +430,7 @@ const char *
i386_pe_strip_name_encoding (str)
const char *str;
{
if (*str == '@')
if (*str == DLL_IMPORT_EXPORT_PREFIX)
str += 3;
if (*str == '*')
str += 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment