aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-10-03 10:06:26 +0000
committerNick Clifton <nickc@redhat.com>2006-10-03 10:06:26 +0000
commit00479ba8f9cd7f2ba84c6c3304987afcb4f109b8 (patch)
tree3990d1c557eba956aed6188aeae444a8cb82e95e /ld/emultempl
parent9f1bed8bb1e87c140fa1980ce9e6c5f64021657c (diff)
downloadbinutils-00479ba8f9cd7f2ba84c6c3304987afcb4f109b8.zip
binutils-00479ba8f9cd7f2ba84c6c3304987afcb4f109b8.tar.gz
binutils-00479ba8f9cd7f2ba84c6c3304987afcb4f109b8.tar.bz2
* pe-dll.c : Fix typo.
(autofilter_symbolprefixlist) : Remove __imp_. (is_import) : New. (auto-export) : Remove re-import check. Moved to callers. (process_def_file) : Check is symbol is an import. Always underscore __imp_. Only skip underscore on underscored targets. (make_one) : Always underscore __imp_. (pe_create_runtime_relocator_reference) : Only underscore _pei386_runtime_relocator on underscored targets. (pe_process_import_defs) : Always underscore __imp_. * pe.em (U) : New macro. (set_pe_subsystem) : Remove underscore from _WinMainCRTStartup on wince subsystem case. (pe_find_data_imports) : Use U on "_head_". (gld_${EMULATION_NAME}_unrecognized_file) : Use U.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/pe.em9
1 files changed, 5 insertions, 4 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index fa4cafe..5416fac 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -115,6 +115,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
#define PE_DEF_FILE_ALIGNMENT 0x00000200
#endif
+#define U(S) ${INITIAL_SYMBOL_CHAR} S
static struct internal_extra_pe_aouthdr pe;
static int dll;
@@ -400,7 +401,7 @@ set_pe_subsystem (void)
{ "windows", 2, "WinMainCRTStartup" },
{ "console", 3, "mainCRTStartup" },
{ "posix", 7, "__PosixProcessStartup"},
- { "wince", 9, "_WinMainCRTStartup" },
+ { "wince", 9, "WinMainCRTStartup" },
{ "xbox", 14, "mainCRTStartup" },
{ NULL, 0, NULL }
};
@@ -925,14 +926,14 @@ pe_find_data_imports (void)
for (i = 0; i < nsyms; i++)
{
- if (! CONST_STRNEQ (symbols[i]->name, "__head_"))
+ if (! CONST_STRNEQ (symbols[i]->name, U ("_head_")))
continue;
if (pe_dll_extra_pe_debug)
printf ("->%s\n", symbols[i]->name);
pe_data_import_dll = (char*) (symbols[i]->name +
- sizeof ("__head_") - 1);
+ sizeof (U ("_head_")) - 1);
break;
}
@@ -1342,7 +1343,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
{
struct bfd_link_hash_entry *h;
- sprintf (buf, "_%s", pe_def_file->exports[i].internal_name);
+ sprintf (buf, "%s%s", U (""), pe_def_file->exports[i].internal_name);
h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE);
if (h == (struct bfd_link_hash_entry *) NULL)