aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/pe.em
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-09-24 15:03:01 +0000
committerNick Clifton <nickc@redhat.com>2001-09-24 15:03:01 +0000
commit72358f656865476617bb9ee497d08b32a48c95c8 (patch)
treea438c5f20c6a24bc65c55e49090550d8956f7661 /ld/emultempl/pe.em
parent89b57c9acc2dd358b76bdfe5a2b960a2fb17fc22 (diff)
downloadgdb-72358f656865476617bb9ee497d08b32a48c95c8.zip
gdb-72358f656865476617bb9ee497d08b32a48c95c8.tar.gz
gdb-72358f656865476617bb9ee497d08b32a48c95c8.tar.bz2
Define and use pe_get_data_import_dll_name().
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r--ld/emultempl/pe.em21
1 files changed, 19 insertions, 2 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 990b6a7..a863526 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -153,6 +153,7 @@ static char *pe_out_def_filename = NULL;
static char *pe_implib_filename = NULL;
static int pe_enable_auto_image_base = 0;
static char *pe_dll_search_prefix = NULL;
+static char *pe_data_import_dll = NULL;
#endif
extern const char *output_filename;
@@ -755,6 +756,24 @@ gld_${EMULATION_NAME}_after_parse ()
ldlang_add_undef (entry_symbol);
}
+/* Previously, pe-dll.c directly accessed pe_data_import_dll,
+ which was only defined if DLL_SUPPORT. This cause a build
+ failure on certain targets. At least this function will
+ exist regardless of whether DLL_SUPPORT is defined or not.
+
+ However, it's still a kludge. pe-dll.c shouldn't directly
+ call any functions other than the gld_${EMULATION_NAME}_*. */
+
+char *
+pe_get_data_import_dll_name ()
+{
+#ifdef DLL_SUPPORT
+ return pe_data_import_dll;
+#else
+ return "unknown";
+#endif
+}
+
#ifdef DLL_SUPPORT
static struct bfd_link_hash_entry *pe_undef_found_sym;
@@ -879,8 +898,6 @@ make_import_fixup (rel, s)
return 1;
}
-char *pe_data_import_dll;
-
static void
pe_find_data_imports ()
{