Fix building with --enable-targets=all.
authorNick Clifton <nickc@redhat.com>
Wed, 1 Mar 2000 20:54:37 +0000 (20:54 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 1 Mar 2000 20:54:37 +0000 (20:54 +0000)
ld/ChangeLog
ld/emulparams/mipspe.sh
ld/emulparams/shpe.sh
ld/emultempl/pe.em
ld/pe-dll.c

index 3b0d9cc92e0c56ae345f6cd768f94f8c04f35039..c4804898abcd5b4cecc962050f81ac35b444ac47 100644 (file)
@@ -1,3 +1,17 @@
+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
index cfd9698d7cbcdc3a30138a1652ad3d66b0348cef..34674526c519cde90112e5a247c511049d02a460 100644 (file)
@@ -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=\"_\"
index 8f8ee97ef8255fa116ae2d139e0a73a826218af1..2f8664ccddccab076c46c805d7909e2707cb2195 100644 (file)
@@ -2,3 +2,5 @@ ARCH=sh
 SCRIPT_NAME=pe
 OUTPUT_FORMAT="pei-shl"
 TEMPLATE_NAME=pe
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
index 5bb9cc6864f9c21fd5e472050fa5edeff2095fe9..d13bb40be3637584a7719c0acd50eaf4f39cd011 100644 (file)
@@ -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;
index 5b2ffe42d9ff5156692419cd579b3b868d844c60..6b8b1af007de0e7cf4a8032076e543fa9739b340 100644 (file)
@@ -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)
     {