/* Routines to help build PEI-format DLLs (Win32 etc)
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Written by DJ Delorie <dj@cygnus.com>
This file is part of GLD, the Gnu Linker.
int pe_dll_do_default_excludes = 1;
int pe_dll_kill_ats = 0;
int pe_dll_stdcall_aliases = 0;
+int pe_dll_warn_dup_exports = 0;
+int pe_dll_compat_implib = 0;
/************************************************************************
{
if (i > 0 && strcmp (e[i].name, e[i - 1].name) == 0)
{
- /* This is a duplicate */
+ /* This is a duplicate. */
if (e[j - 1].ordinal != -1
&& e[i].ordinal != -1
&& e[j - 1].ordinal != e[i].ordinal)
{
- /* xgettext:c-format */
- einfo (_("%XError, duplicate EXPORT with oridinals: %s (%d vs %d)\n"),
- e[j - 1].name, e[j - 1].ordinal, e[i].ordinal);
+ if (pe_dll_warn_dup_exports)
+ /* xgettext:c-format */
+ einfo (_("%XError, duplicate EXPORT with oridinals: %s (%d vs %d)\n"),
+ e[j - 1].name, e[j - 1].ordinal, e[i].ordinal);
}
else
{
- /* xgettext:c-format */
- einfo (_("Warning, duplicate EXPORT: %s\n"),
- e[j - 1].name);
+ if (pe_dll_warn_dup_exports)
+ /* xgettext:c-format */
+ einfo (_("Warning, duplicate EXPORT: %s\n"),
+ e[j - 1].name);
}
if (e[i].ordinal)
e[j - 1].ordinal = e[i].ordinal;
quick_symbol (abfd, U(""), exp->internal_name, "", tx, BSF_GLOBAL, 0);
quick_symbol (abfd, U("_head_"), dll_symname, "", UNDSEC, BSF_GLOBAL, 0);
quick_symbol (abfd, U("__imp_"), exp->internal_name, "", id5, BSF_GLOBAL, 0);
- quick_symbol (abfd, U("_imp__"), exp->internal_name, "", id5, BSF_GLOBAL, 0);
+ if (pe_dll_compat_implib)
+ quick_symbol (abfd, U("__imp_"), exp->internal_name, "",
+ id5, BSF_GLOBAL, 0);
bfd_set_section_size (abfd, tx, jmp_byte_count);
td = (unsigned char *) xmalloc (jmp_byte_count);