This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch to get rid of warnings when building on ARM...


I was cross compiling binutils and decided to examine all the warnings. 
Tne attached patch gets rid of all warnings except those for
signed-unsigned comparisons and unused parameters.

Well not quite.  There is still one left in gas/write.c.  In
write_object_file(), the variable punt is passed to elf_frob_symbol()
and tc_frob_symbol().  I believe they should be passed the address of
punt.  Comments?

Scott
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/binutils/binutils/gas/config/tc-arm.c,v
retrieving revision 1.21
diff -u -p -r1.21 tc-arm.c
--- tc-arm.c	1999/09/22 09:05:32	1.21
+++ tc-arm.c	1999/10/27 14:19:53
@@ -6984,7 +6984,7 @@ arm_parse_reloc ()
     /* Added support for parsing "var(PLT)" branch instructions */
     /* generated by GCC for PLT relocs */
     MAP ("(plt)",    BFD_RELOC_ARM_PLT32),
-    NULL, 0,         BFD_RELOC_UNUSED
+    { NULL, 0,         BFD_RELOC_UNUSED }
 #undef MAP    
   };
 
Index: gas/config/tc-arm.h
===================================================================
RCS file: /cvs/binutils/binutils/gas/config/tc-arm.h,v
retrieving revision 1.4
diff -u -p -r1.4 tc-arm.h
--- tc-arm.h	1999/07/15 01:33:07	1.4
+++ tc-arm.h	1999/10/27 14:19:53
@@ -113,8 +113,13 @@
    deliberately not been updated to mark assembler created stabs
    symbols as Thumb.  */
 
+#define TC_FIX_TYPE PTR
+#define TC_INIT_FIX_DATA(FIXP) ((FIXP)->tc_fix_data = NULL)
+
 #ifdef OBJ_ELF
+#include "write.h"        /* For definition of fixS */
 #define obj_fix_adjustable(fixP) arm_fix_adjustable (fixP)
+boolean arm_fix_adjustable PARAMS ((fixS *));
 #else
 #define obj_fix_adjustable(fixP) 0
 #endif
@@ -139,8 +144,6 @@
 #define THUMB_SET_FUNC(s,t)     ((t) ? ARM_SET_FLAG (s, THUMB_FLAG_FUNC)    : ARM_RESET_FLAG (s, THUMB_FLAG_FUNC))
 
 
-#define TC_FIX_TYPE PTR
-#define TC_INIT_FIX_DATA(FIXP) ((FIXP)->tc_fix_data = NULL)
 
 #define TC_START_LABEL(C,STR) \
   (c == ':' || (c == '/' && arm_data_in_code ()))
@@ -154,7 +157,8 @@ char * arm_canonicalize_symbol_name PARA
  extern void arm_adjust_symtab PARAMS ((void));
 
 #ifdef OBJ_ELF
-#define obj_frob_symbol(sym, punt)  armelf_frob_symbol (sym, punt)
+#define obj_frob_symbol(sym, punt)  armelf_frob_symbol ((sym), (punt))
+void armelf_frob_symbol PARAMS ((symbolS *, int *));
 #endif
 
 #define tc_aout_pre_write_hook(x)	{;}	/* not used */
Index: ld/emultempl/armelf.em
===================================================================
RCS file: /cvs/binutils/binutils/ld/emultempl/armelf.em,v
retrieving revision 1.10
diff -u -p -r1.10 armelf.em
--- armelf.em	1999/10/26 12:13:20	1.10
+++ armelf.em	1999/10/27 14:19:55
@@ -28,6 +28,9 @@ Foundation, Inc., 59 Temple Place - Suit
 
 #include "bfd.h"
 #include "sysdep.h"
+
+#include <ctype.h>
+
 #include "bfdlink.h"
 #include "getopt.h"
 
Index: opcodes/arm-dis.c
===================================================================
RCS file: /cvs/binutils/binutils/opcodes/arm-dis.c,v
retrieving revision 1.6
diff -u -p -r1.6 arm-dis.c
--- arm-dis.c	1999/07/05 07:44:09	1.6
+++ arm-dis.c	1999/10/27 14:19:56
@@ -19,6 +19,7 @@ You should have received a copy of the G
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+#include "sysdep.h"
 #include "dis-asm.h"
 #define DEFINE_TABLE
 #include "arm-opc.h"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]