This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

tic4x objcopy fail


Fixes random failure of "objcopy (simple copy)" test on tic4x-coff.
This macro belongs with the RELOC define.

include/coff/
	* ti.h (SWAP_OUT_RELOC_EXTRA): Define.
bfd/
	* coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Delete.
	* coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Delete.

Index: include/coff/ti.h
===================================================================
RCS file: /cvs/src/src/include/coff/ti.h,v
retrieving revision 1.23
diff -u -p -r1.23 ti.h
--- include/coff/ti.h	15 Apr 2010 10:26:07 -0000	1.23
+++ include/coff/ti.h	4 Feb 2013 04:56:03 -0000
@@ -546,6 +546,9 @@ struct external_reloc
 #define RELSZ_V0 10                 /* FIXME -- coffcode.h needs fixing */
 #define RELSZ 12                    /* for COFF1/2 */
 
+#define SWAP_OUT_RELOC_EXTRA(abfd, src, dst) \
+  do memset (dst->r_reserved, 0, sizeof (dst->r_reserved)); while (0)
+
 /* various relocation types.  */
 #define R_ABS     0x0000            /* no relocation */
 #define R_REL13   0x002A            /* 13-bit direct reference (???) */
Index: bfd/coff-tic54x.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-tic54x.c,v
retrieving revision 1.27
diff -u -p -r1.27 coff-tic54x.c
--- bfd/coff-tic54x.c	13 Jul 2012 14:22:45 -0000	1.27
+++ bfd/coff-tic54x.c	4 Feb 2013 04:55:26 -0000
@@ -323,15 +323,6 @@ ticoff_bfd_is_local_label_name (bfd *abf
 
 #define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
 
-/* Clear the r_reserved field in relocs.  */
-#define SWAP_OUT_RELOC_EXTRA(abfd,src,dst) \
-  do \
-    { \
-      dst->r_reserved[0] = 0; \
-      dst->r_reserved[1] = 0; \
-    } \
-  while (0)
-
 /* Customize coffcode.h; the default coff_ functions are set up to use COFF2;
    coff_bad_format_hook uses BADMAG, so set that for COFF2.  The COFF1
    and COFF0 vectors use custom _bad_format_hook procs instead of setting
Index: bfd/coff-tic80.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-tic80.c,v
retrieving revision 1.24
diff -u -p -r1.24 coff-tic80.c
--- bfd/coff-tic80.c	10 Jan 2013 20:03:52 -0000	1.24
+++ bfd/coff-tic80.c	4 Feb 2013 04:55:26 -0000
@@ -700,15 +700,6 @@ coff_tic80_relocate_section (bfd *output
   return TRUE;
 }
 
-/* Clear the r_reserved field in relocs.  */
-#define SWAP_OUT_RELOC_EXTRA(abfd,src,dst) \
-  do \
-    { \
-      dst->r_reserved[0] = 0; \
-      dst->r_reserved[1] = 0; \
-    } \
-  while (0)
-
 #define TIC80COFF 1		/* Customize coffcode.h */
 #undef C_AUTOARG		/* Clashes with TIc80's C_UEXT */
 #undef C_LASTENT		/* Clashes with TIc80's C_STATLAB */

-- 
Alan Modra
Australia Development Lab, IBM


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