/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
Contributed by Mumit Khan (khan@xraylith.wisc.edu).
This file is part of GNU Binutils.
#include <unistd.h>
#endif
-#include "getopt.h"
+#include "bfd.h"
#include "libiberty.h"
+#include "bucomm.h"
+#include "getopt.h"
#include "dyn-string.h"
#include <ctype.h>
static char *program_version = "0.2.4";
static char *driver_name = "gcc";
-static char *cygwin32_driver_flags =
+static char *cygwin_driver_flags =
"-Wl,--dll -nostartfiles";
static char *mingw32_driver_flags = "-mdll";
static char *generic_driver_flags = "-Wl,--dll";
typedef enum {
UNKNOWN_TARGET,
- CYGWIN32_TARGET,
+ CYGWIN_TARGET,
MINGW32_TARGET
}
target_type;
/* set the target platform. */
if (strstr (target, "cygwin32"))
- which_target = CYGWIN32_TARGET;
+ which_target = CYGWIN_TARGET;
else if (strstr (target, "mingw32"))
which_target = MINGW32_TARGET;
else
{
switch (which_target)
{
- case CYGWIN32_TARGET:
- driver_flags = cygwin32_driver_flags;
+ case CYGWIN_TARGET:
+ driver_flags = cygwin_driver_flags;
break;
case MINGW32_TARGET:
{
switch (which_target)
{
- case CYGWIN32_TARGET:
- entry_point = "__cygwin32_dll_entry@12";
+ case CYGWIN_TARGET:
+ entry_point = "__cygwin_dll_entry@12";
break;
case MINGW32_TARGET:
{
char *tmpbuf = (char *) xmalloc (sizeof ("0x12345678") + 1);
unsigned long hash = strhash (dll_file_name);
- sprintf (tmpbuf, "0x%.8X", 0x60000000|((hash<<16)&0xFFC0000));
+ sprintf (tmpbuf, "0x%.8lX", 0x60000000|((hash<<16)&0xFFC0000));
image_base_str = tmpbuf;
}
{
dyn_string_append (step_pre1, " --export-all --exclude-symbol=");
dyn_string_append (step_pre1,
- "_cygwin32_dll_entry@12,DllMainCRTStartup@12,DllMain@12,DllEntryPoint@12");
+ "_cygwin_dll_entry@12,DllMainCRTStartup@12,DllMain@12,DllEntryPoint@12");
}
dyn_string_append (step_pre1, " --output-def ");
dyn_string_append (step_pre1, def_file_name);