aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-03-01 20:54:37 +0000
committerNick Clifton <nickc@redhat.com>2000-03-01 20:54:37 +0000
commitf0c87f889d8bac9de4a6e0ad4a9a803fc6064a87 (patch)
tree58b59553ca40c9621f650db082e29c0ff912e505
parent86033394008aa009b3382199efa24b0cfa749862 (diff)
downloadgdb-f0c87f889d8bac9de4a6e0ad4a9a803fc6064a87.zip
gdb-f0c87f889d8bac9de4a6e0ad4a9a803fc6064a87.tar.gz
gdb-f0c87f889d8bac9de4a6e0ad4a9a803fc6064a87.tar.bz2
Fix building with --enable-targets=all.
-rw-r--r--ld/ChangeLog14
-rw-r--r--ld/emulparams/mipspe.sh2
-rw-r--r--ld/emulparams/shpe.sh2
-rw-r--r--ld/emultempl/pe.em17
-rw-r--r--ld/pe-dll.c15
5 files changed, 35 insertions, 15 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3b0d9cc..c480489 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,19 @@
2000-03-01 H.J. Lu <hjl@gnu.org>
+ * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
+ * emulparams/shpe.sh: Likewise.
+
+2000-03-01 Nick Clifton <nickc@cygnus.com>
+
+ * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
+ to unused parameters.
+
+ * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
+ functions only used by DLL code.
+ (_place_orphan): Initialise 'dollar'.
+
+2000-03-01 H.J. Lu <hjl@gnu.org>
+
* ldmain.c (undefined_symbol): Take one more arg, fatal, to
indicate if the undefined symbol is a fatal error or not.
Don't delete the output file if "fatal" is false.
diff --git a/ld/emulparams/mipspe.sh b/ld/emulparams/mipspe.sh
index cfd9698..3467452 100644
--- a/ld/emulparams/mipspe.sh
+++ b/ld/emulparams/mipspe.sh
@@ -4,3 +4,5 @@ OUTPUT_FORMAT="pei-mips"
OUTPUT_ARCH="mips"
RELOCATEABLE_OUTPUT_FORMAT="ecoff-littlemips"
TEMPLATE_NAME=pe
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/ld/emulparams/shpe.sh b/ld/emulparams/shpe.sh
index 8f8ee97..2f8664c 100644
--- a/ld/emulparams/shpe.sh
+++ b/ld/emulparams/shpe.sh
@@ -2,3 +2,5 @@ ARCH=sh
SCRIPT_NAME=pe
OUTPUT_FORMAT="pei-shl"
TEMPLATE_NAME=pe
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 5bb9cc6..d13bb40 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -114,9 +114,11 @@ static int support_old_code = 0;
static char * thumb_entry_symbol = NULL;
static lang_assignment_statement_type *image_base_statement = 0;
-static char *pe_out_def_filename = 0;
static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */
+#ifdef DLL_SUPPORT
+static char *pe_out_def_filename = 0;
static char *pe_implib_filename = 0;
+#endif
extern const char *output_filename;
@@ -642,6 +644,7 @@ pe_undef_cdecl_match (h, string)
return true;
}
+#ifdef DLL_SUPPORT
static void
pe_fixup_stdcalls ()
{
@@ -706,6 +709,7 @@ pe_fixup_stdcalls ()
}
}
}
+#endif /* DLL_SUPPORT */
static void
gld_${EMULATION_NAME}_after_open ()
@@ -757,7 +761,7 @@ gld_${EMULATION_NAME}_after_open ()
#endif
{
- int is_ms_arch;
+ int is_ms_arch = 0;
bfd *cur_arch = 0;
lang_input_statement_type *is2;
@@ -869,7 +873,7 @@ gld_${EMULATION_NAME}_before_allocation()
/* This is called when an input file isn't recognized as a BFD. We
check here for .DEF files and pull them in automatically. */
-
+#ifdef DLL_SUPPORT
static int
saw_option(char *option)
{
@@ -879,10 +883,11 @@ saw_option(char *option)
return init[i].inited;
return 0;
}
+#endif
static boolean
gld_${EMULATION_NAME}_unrecognized_file(entry)
- lang_input_statement_type *entry;
+ lang_input_statement_type *entry ATTRIBUTE_UNUSED;
{
#ifdef DLL_SUPPORT
const char *ext = entry->filename + strlen (entry->filename) - 4;
@@ -967,7 +972,7 @@ gld_${EMULATION_NAME}_unrecognized_file(entry)
static boolean
gld_${EMULATION_NAME}_recognized_file(entry)
- lang_input_statement_type *entry;
+ lang_input_statement_type *entry ATTRIBUTE_UNUSED;
{
#ifdef DLL_SUPPORT
#ifdef TARGET_IS_i386pe
@@ -1087,7 +1092,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
asection *s;
{
const char *secname;
- char *dollar;
+ char *dollar = NULL;
if ((s->flags & SEC_ALLOC) == 0)
return false;
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 5b2ffe4..6b8b1af 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -617,15 +617,12 @@ generate_edata (abfd, info)
static void
fill_exported_offsets (abfd, info)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
{
- int i, j;
+ int i;
struct bfd_link_hash_entry *blhe;
- bfd *b;
- struct sec *s;
- def_file_export *e=0;
-
+
for (i = 0; i < pe_def_file->num_exports; i++)
{
char *name = (char *) xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
@@ -1402,12 +1399,12 @@ make_one (exp, parent)
bfd *parent;
{
asection *tx, *id7, *id5, *id4, *id6;
- unsigned char *td, *d7, *d5, *d4, *d6;
+ unsigned char *td, *d7, *d5, *d4, *d6 = NULL;
int len;
char *oname;
bfd *abfd;
- unsigned char *jmp_bytes;
- int jmp_byte_count;
+ unsigned char *jmp_bytes = NULL;
+ int jmp_byte_count = 0;
switch (pe_details->pe_arch)
{