aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2000-07-10 17:20:35 +0000
committerH.J. Lu <hjl.tools@gmail.com>2000-07-10 17:20:35 +0000
commit2ef53d66654006a806512ca1060ea2f6f59b172e (patch)
treeca5ae7d0901e72e8eaa429f09607dd2a8078a844
parent9a8cbb092b1e9e8260f19276f484af2bff46fe07 (diff)
downloadgdb-2ef53d66654006a806512ca1060ea2f6f59b172e.zip
gdb-2ef53d66654006a806512ca1060ea2f6f59b172e.tar.gz
gdb-2ef53d66654006a806512ca1060ea2f6f59b172e.tar.bz2
2000-07-10 H.J. Lu <hjl@gnu.org>
* emultempl/pe.em (pe_enable_stdcall_fixup): Protect with DLL_SUPPORT. (strhash): Likewise. (compute_dll_image_base): Likewise. (pe_undef_found_sym): Likewise. (pe_undef_cdecl_match): Likewise. (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the argument "arch" with ATTRIBUTE_UNUSED.
-rw-r--r--ld/ChangeLog15
-rw-r--r--ld/emultempl/pe.em12
2 files changed, 22 insertions, 5 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 456a283..44b124d 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,14 @@
+2000-07-10 H.J. Lu <hjl@gnu.org>
+
+ * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
+ DLL_SUPPORT.
+ (strhash): Likewise.
+ (compute_dll_image_base): Likewise.
+ (pe_undef_found_sym): Likewise.
+ (pe_undef_cdecl_match): Likewise.
+ (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
+ argument "arch" with ATTRIBUTE_UNUSED.
+
2000-07-10 Alan Modra <alan@linuxcare.com.au>
* configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
@@ -57,14 +68,14 @@
2000-07-07 Charles Wilson <cwilson@ece.gatech.edu>
- * ld/emultempl/pe.em: institute the following search order for
+ * emultempl/pe.em: institute the following search order for
dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
static lib (libfoo.a) if none of the above are found.
2000-07-07 Mumit Khan <khan@xraylith.wisc.edu>
- * ld/emultempl/pe.em (pe_enable_auto_image_base): New variable.
+ * emultempl/pe.em (pe_enable_auto_image_base): New variable.
(longopts): New --{enable,disable}-auto-image-base options.
(gld_${EMULATION_NAME}_list_options): Document.
(gld_${EMULATION_NAME}_parse): Handle.
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 92af07e..ee213ae 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -114,8 +114,8 @@ static int support_old_code = 0;
static char * thumb_entry_symbol = NULL;
static lang_assignment_statement_type *image_base_statement = 0;
-static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */
#ifdef DLL_SUPPORT
+static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */
static char *pe_out_def_filename = NULL;
static char *pe_implib_filename = NULL;
static int pe_enable_auto_image_base = 0;
@@ -560,6 +560,7 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
}
+#ifdef DLL_SUPPORT
static unsigned long
strhash (const char *str)
{
@@ -590,6 +591,7 @@ compute_dll_image_base (const char *ofile)
unsigned long hash = strhash (ofile);
return 0x60000000 | ((hash << 16) & 0x0FFC0000);
}
+#endif
/* Assign values to the special symbols before the linker script is
read. */
@@ -607,8 +609,12 @@ gld_${EMULATION_NAME}_set_symbols ()
if (link_info.relocateable)
init[IMAGEBASEOFF].value = 0;
else if (init[DLLOFF].value || link_info.shared)
+#ifdef DLL_SUPPORT
init[IMAGEBASEOFF].value = (pe_enable_auto_image_base) ?
compute_dll_image_base (output_filename) : NT_DLL_IMAGE_BASE;
+#else
+ init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE;
+#endif
else
init[IMAGEBASEOFF].value = NT_EXE_IMAGE_BASE;
}
@@ -673,6 +679,7 @@ gld_${EMULATION_NAME}_after_parse ()
ldlang_add_undef (entry_symbol);
}
+#ifdef DLL_SUPPORT
static struct bfd_link_hash_entry *pe_undef_found_sym;
static boolean
@@ -691,7 +698,6 @@ pe_undef_cdecl_match (h, string)
return true;
}
-#ifdef DLL_SUPPORT
static void
pe_fixup_stdcalls ()
{
@@ -1355,7 +1361,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
static boolean
gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
- const char * arch;
+ const char * arch ATTRIBUTE_UNUSED;
search_dirs_type * search;
lang_input_statement_type * entry;
{