This is the mail archive of the binutils@sources.redhat.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]

include/* changes for the bfd/ cleanup


At least here I don't need to compress the diff. :-)

include/ChangeLog
	* objalloc.h (OBJALLOC_ALIGN): Define using offsetof.

include/aout/ChangeLog
	* aout64.h: Formatting fixes.
	(N_TXTADDR): Evaluate to a bfd_vma.
	(N_DATADDR): Avoid negative unsigned warning.
	* hp300hpux.h: Formatting fixes.
	(N_DATADDR): As above.

include/coff/ChangeLog
	* external.h (GET_LINENO_LNNO): Use H_GET_32/16.
	(PUT_LINENO_LNNO): Use H_PUT_32/16.
	* m88k.h (GET_LNSZ_SIZE, GET_LNSZ_LNNO, GET_SCN_NRELOC,
	GET_SCN_NLINNO): Use H_GET_32.
	(PUT_LNSZ_LNNO, PUT_LNSZ_SIZE, PUT_SCN_NRELOC, PUT_SCN_NLINNO):
	Use H_PUT_32.
	* ti.h: Formatting fixes.  Make use of H_GET_* and H_PUT_* throughout.
	* xcoff.h: White space changes.

include/elf/ChangeLog
	* internal.h (elf_internal_rela): Make r_addend a bfd_vma.

-- 
Alan Modra

Index: include/objalloc.h
===================================================================
RCS file: /cvs/src/src/include/objalloc.h,v
retrieving revision 1.1.1.1
diff -u -p -w -r1.1.1.1 objalloc.h
--- objalloc.h	1999/05/03 07:29:02	1.1.1.1
+++ objalloc.h	2001/09/17 09:28:54
@@ -56,12 +56,11 @@ struct objalloc_align { char x; double d
 #ifndef offsetof
 #include <stddef.h>
 #endif
-#define OBJALLOC_ALIGN \
-  ((ptrdiff_t) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
-#else
-#define OBJALLOC_ALIGN \
-  ((long) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
 #endif
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
+#endif
+#define OBJALLOC_ALIGN offsetof (struct objalloc_align, d)
 
 /* Create an objalloc structure.  Returns NULL if malloc fails.  */
 
Index: include/aout/aout64.h
===================================================================
RCS file: /cvs/src/src/include/aout/aout64.h,v
retrieving revision 1.4
diff -u -p -w -r1.4 aout64.h
--- aout64.h	2001/03/14 02:27:43	1.4
+++ aout64.h	2001/09/17 09:28:54
@@ -131,7 +131,8 @@ struct external_exec 
 /* This macro is only relevant for ZMAGIC files; QMAGIC always has the header
    in the text.  */
 #ifndef N_HEADER_IN_TEXT
-#define N_HEADER_IN_TEXT(x) (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
+#define N_HEADER_IN_TEXT(x) \
+  (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
 #endif
 
 /* Sun shared libraries, not linux.  This macro is only relevant for ZMAGIC
@@ -153,13 +154,15 @@ struct external_exec 
 #define N_TXTADDR(x) \
     (/* The address of a QMAGIC file is always one page in, */ \
      /* with the header in the text.  */ \
-     N_IS_QMAGIC (x) ? TARGET_PAGE_SIZE + EXEC_BYTES_SIZE : \
-     N_MAGIC(x) != ZMAGIC ? 0 :	/* object file or NMAGIC */\
-     N_SHARED_LIB(x) ? 0 :	\
-     N_HEADER_IN_TEXT(x)  ?	\
-	    TEXT_START_ADDR + EXEC_BYTES_SIZE :	/* no padding */\
-	    TEXT_START_ADDR			/* a page of padding */\
-    )
+     N_IS_QMAGIC (x)							\
+     ? (bfd_vma) TARGET_PAGE_SIZE + EXEC_BYTES_SIZE			\
+     : (N_MAGIC (x) != ZMAGIC						\
+	? (bfd_vma) 0	/* object file or NMAGIC */			\
+	: (N_SHARED_LIB (x)						\
+	   ? (bfd_vma) 0						\
+	   : (N_HEADER_IN_TEXT (x)					\
+	      ? (bfd_vma) TEXT_START_ADDR + EXEC_BYTES_SIZE		\
+	      : (bfd_vma) TEXT_START_ADDR))))
 #endif
 
 /* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding
@@ -179,12 +182,13 @@ struct external_exec 
 #ifndef N_TXTOFF
 #define N_TXTOFF(x)	\
     (/* For {O,N,Q}MAGIC, no padding.  */ \
-     N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE : \
-     N_SHARED_LIB(x) ? 0 : \
-     N_HEADER_IN_TEXT(x) ?	\
-	    EXEC_BYTES_SIZE :			/* no padding */\
-	    ZMAGIC_DISK_BLOCK_SIZE		/* a page of padding */\
-    )
+     N_MAGIC (x) != ZMAGIC						\
+     ? EXEC_BYTES_SIZE							\
+     : (N_SHARED_LIB (x)						\
+	? 0								\
+	: (N_HEADER_IN_TEXT (x)						\
+	   ? EXEC_BYTES_SIZE		/* no padding */		\
+	   : ZMAGIC_DISK_BLOCK_SIZE	/* a page of padding */)))
 #endif
 /* Size of the text section.  It's always as stated, except that we
    offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF
@@ -194,20 +198,23 @@ struct external_exec 
 #ifndef N_TXTSIZE
 #define	N_TXTSIZE(x) \
     (/* For QMAGIC, we don't consider the header part of the text section.  */\
-     N_IS_QMAGIC (x) ? (x).a_text - EXEC_BYTES_SIZE : \
-     (N_MAGIC(x) != ZMAGIC || N_SHARED_LIB(x)) ? (x).a_text : \
-     N_HEADER_IN_TEXT(x)  ?	\
-	    (x).a_text - EXEC_BYTES_SIZE:	/* no padding */\
-	    (x).a_text				/* a page of padding */\
-    )
+   N_IS_QMAGIC (x)							\
+   ? (x).a_text - EXEC_BYTES_SIZE					\
+   : ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x))			\
+      ? (x).a_text							\
+      : (N_HEADER_IN_TEXT (x)						\
+	 ? (x).a_text - EXEC_BYTES_SIZE	/* no padding */		\
+	 : (x).a_text			/* a page of padding */ )))
 #endif
 /* The address of the data segment in virtual memory.
    It is the text segment address, plus text segment size, rounded
    up to a N_SEGSIZE boundary for pure or pageable files. */
 #ifndef N_DATADDR
 #define N_DATADDR(x) \
-    (N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+N_TXTSIZE(x)) \
-     :  (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
+  (N_MAGIC (x) == OMAGIC						\
+   ? (N_TXTADDR (x) + N_TXTSIZE (x))					\
+   : (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1)		\
+		       & ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
 #endif
 /* The address of the BSS segment -- immediately after the data segment.  */
 
@@ -228,10 +235,8 @@ struct external_exec 
    for NMAGIC.  */
 
 #ifndef N_DATOFF
-#define N_DATOFF(x) \
- (N_TXTOFF(x) + N_TXTSIZE(x))
+#define N_DATOFF(x)	( N_TXTOFF (x) + N_TXTSIZE (x) )
 #endif
-
 #ifndef N_TRELOFF
 #define N_TRELOFF(x)	( N_DATOFF(x) + (x).a_data )
 #endif
Index: include/aout/hp300hpux.h
===================================================================
RCS file: /cvs/src/src/include/aout/hp300hpux.h,v
retrieving revision 1.3
diff -u -p -w -r1.3 hp300hpux.h
--- hp300hpux.h	2001/03/18 02:56:20	1.3
+++ hp300hpux.h	2001/09/17 09:28:54
@@ -73,13 +73,13 @@ struct hp300hpux_header_extension
 #define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
 
 #define N_DATADDR(x) \
-    ((N_MAGIC(x)==OMAGIC || N_MAGIC(x)==HPUX_DOT_O_MAGIC) ? \
-        (N_TXTADDR(x)+N_TXTSIZE(x)) \
-     :  (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
+  ((N_MAGIC (x) == OMAGIC || N_MAGIC (x) == HPUX_DOT_O_MAGIC)		\
+   ? (N_TXTADDR (x) + N_TXTSIZE (x))					\
+   : (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1)		\
+		       & ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
 
 #define _N_BADMACH(x)                                                   \
-(((N_MACHTYPE (x)) != HP9000S200_ID) &&                                 \
- ((N_MACHTYPE (x)) != HP98x6_ID))
+  (((N_MACHTYPE (x)) != HP9000S200_ID) && ((N_MACHTYPE (x)) != HP98x6_ID))
 
 #define _N_BADMAG(x)	  (N_MAGIC(x) != HPUX_DOT_O_MAGIC \
                         && N_MAGIC(x) != OMAGIC		\
Index: include/coff/external.h
===================================================================
RCS file: /cvs/src/src/include/coff/external.h,v
retrieving revision 1.2
diff -u -p -w -r1.2 external.h
--- external.h	2001/03/24 00:45:11	1.2
+++ external.h	2001/09/17 09:28:54
@@ -113,12 +113,12 @@ struct external_lineno
 #define	LINESZ	(4 + L_LNNO_SIZE)
 
 #if L_LNNO_SIZE == 4
-#define GET_LINENO_LNNO(abfd, ext)      bfd_h_get_32 (abfd,      (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd, val, ext) bfd_h_put_32 (abfd, val, (bfd_byte *) (ext->l_lnno));
+#define GET_LINENO_LNNO H_GET_32
+#define PUT_LINENO_LNNO H_PUT_32
 #endif
 #if L_LNNO_SIZE == 2
-#define GET_LINENO_LNNO(abfd, ext)     bfd_h_get_16 (abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16 (abfd,val,  (bfd_byte *) (ext->l_lnno));
+#define GET_LINENO_LNNO H_GET_16
+#define PUT_LINENO_LNNO H_PUT_16
 #endif
 
 #endif /* not DO_NOT_DEFINE_LINENO */
Index: include/coff/m88k.h
===================================================================
RCS file: /cvs/src/src/include/coff/m88k.h,v
retrieving revision 1.3
diff -u -p -w -r1.3 m88k.h
--- m88k.h	2001/03/24 00:45:11	1.3
+++ m88k.h	2001/09/17 09:28:54
@@ -158,20 +158,22 @@ union external_auxent
   } x_tv;			/* info about .tv section (in auxent of symbol .tv)) */
 };
 
-#define GET_FCN_LNNOPTR(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *)ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
-#define GET_FCN_ENDNDX(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
-#define PUT_FCN_LNNOPTR(abfd, in, ext)  bfd_h_put_32(abfd,  in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
-#define PUT_FCN_ENDNDX(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *)   ext->x_sym.x_fcnary.x_fcn.x_endndx)
-#define GET_LNSZ_SIZE(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
-#define GET_LNSZ_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
-#define PUT_LNSZ_LNNO(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
-#define PUT_LNSZ_SIZE(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
-#define GET_SCN_SCNLEN(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_scnlen)
-#define GET_SCN_NRELOC(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nreloc)
-#define GET_SCN_NLINNO(abfd, ext)  bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nlinno)
-#define PUT_SCN_SCNLEN(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_scn.x_scnlen)
-#define PUT_SCN_NRELOC(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *)ext->x_scn.x_nreloc)
-#define PUT_SCN_NLINNO(abfd,in, ext)  bfd_h_put_32(abfd,in, (bfd_byte *) ext->x_scn.x_nlinno)
+#define GET_LNSZ_SIZE(abfd, ext) \
+  H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_size)
+#define GET_LNSZ_LNNO(abfd, ext) \
+  H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno)
+#define PUT_LNSZ_LNNO(abfd, in, ext) \
+  H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno)
+#define PUT_LNSZ_SIZE(abfd, in, ext) \
+  H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_size)
+#define GET_SCN_NRELOC(abfd, ext) \
+  H_GET_32 (abfd, ext->x_scn.x_nreloc)
+#define GET_SCN_NLINNO(abfd, ext) \
+  H_GET_32 (abfd, ext->x_scn.x_nlinno)
+#define PUT_SCN_NRELOC(abfd, in, ext) \
+  H_PUT_32 (abfd, in, ext->x_scn.x_nreloc)
+#define PUT_SCN_NLINNO(abfd, in, ext) \
+  H_PUT_32 (abfd,in, ext->x_scn.x_nlinno)
 
 #define	SYMENT	struct external_syment
 #define	SYMESZ	20
Index: include/coff/ti.h
===================================================================
RCS file: /cvs/src/src/include/coff/ti.h,v
retrieving revision 1.9
diff -u -p -w -r1.9 ti.h
--- ti.h	2001/03/14 02:27:43	1.9
+++ ti.h	2001/09/17 09:28:55
@@ -92,16 +92,22 @@ struct external_filehdr
 /* we need to read/write an extra field in the coff file header */
 #ifndef COFF_ADJUST_FILEHDR_IN_POST
 #define COFF_ADJUST_FILEHDR_IN_POST(abfd,src,dst) \
-do { ((struct internal_filehdr *)(dst))->f_target_id = \
-bfd_h_get_16(abfd, (bfd_byte *)(((FILHDR *)(src))->f_target_id)); \
-} while(0)
+  do									\
+    {									\
+      ((struct internal_filehdr *)(dst))->f_target_id =			\
+	H_GET_16 (abfd, ((FILHDR *)(src))->f_target_id);			\
+    }									\
+  while (0)
 #endif
 
 #ifndef COFF_ADJUST_FILEHDR_OUT_POST
 #define COFF_ADJUST_FILEHDR_OUT_POST(abfd,src,dst) \
-do { bfd_h_put_16(abfd, ((struct internal_filehdr *)(src))->f_target_id, \
-             (bfd_byte *)(((FILHDR *)(dst))->f_target_id)); \
-} while(0)
+  do									\
+    {									\
+      H_PUT_16 (abfd, ((struct internal_filehdr *)(src))->f_target_id,	\
+	       ((FILHDR *)(dst))->f_target_id);				\
+    }									\
+  while (0)
 #endif
 
 #define	FILHDR	struct external_filehdr
@@ -201,35 +207,39 @@ struct external_scnhdr {
    accordingly 
  */
 #define GET_SCNHDR_NRELOC(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, PTR))
+  (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, PTR))
 #define PUT_SCNHDR_NRELOC(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,PTR))
+  (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, PTR))
 #define GET_SCNHDR_NLNNO(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-2))
+  (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -2))
 #define PUT_SCNHDR_NLNNO(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-2))
+  (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -2))
 #define GET_SCNHDR_FLAGS(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-4))
+  (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -4))
 #define PUT_SCNHDR_FLAGS(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-4))
+  (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -4))
 #define GET_SCNHDR_PAGE(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_16 (ABFD,PTR) : bfd_h_get_8 (ABFD, (PTR)-7))
+  (COFF2_P (ABFD) ? H_GET_16 (ABFD, PTR) : H_GET_8 (ABFD, (PTR) -7))
 /* on output, make sure that the "reserved" field is zero */
 #define PUT_SCNHDR_PAGE(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_16 (ABFD,VAL,PTR) : \
-bfd_h_put_8 (ABFD,VAL,(PTR)-7), bfd_h_put_8 (ABFD, 0, (PTR)-8))
+  (COFF2_P (ABFD) \
+   ? H_PUT_16 (ABFD, VAL, PTR) \
+   : H_PUT_8 (ABFD, VAL, (PTR) -7), H_PUT_8 (ABFD, 0, (PTR) -8))
 
 /* TI COFF stores section size as number of bytes (address units, not octets),
    so adjust to be number of octets, which is what BFD expects */ 
 #define GET_SCNHDR_SIZE(ABFD,SZP) \
-(bfd_h_get_32(ABFD,SZP)*bfd_octets_per_byte(ABFD))
+  (H_GET_32 (ABFD, SZP) * bfd_octets_per_byte (ABFD))
 #define PUT_SCNHDR_SIZE(ABFD,SZ,SZP) \
-bfd_h_put_32(ABFD,(SZ)/bfd_octets_per_byte(ABFD),SZP)
+  H_PUT_32 (ABFD, (SZ) / bfd_octets_per_byte (ABFD), SZP)
 
 #define COFF_ADJUST_SCNHDR_IN_POST(ABFD,EXT,INT) \
-do { ((struct internal_scnhdr *)(INT))->s_page = \
-GET_SCNHDR_PAGE(ABFD,(bfd_byte *)((SCNHDR *)(EXT))->s_page); \
-} while(0)
+  do									\
+    {									\
+      ((struct internal_scnhdr *)(INT))->s_page =			\
+	GET_SCNHDR_PAGE (ABFD, ((SCNHDR *)(EXT))->s_page);		\
+    }									\
+   while (0)
 
 /* The line number and reloc overflow checking in coff_swap_scnhdr_out in
    coffswap.h doesn't use PUT_X for s_nlnno and s_nreloc.
@@ -237,16 +247,18 @@ GET_SCNHDR_PAGE(ABFD,(bfd_byte *)((SCNHD
    fields.
  */
 #define COFF_ADJUST_SCNHDR_OUT_POST(ABFD,INT,EXT) \
-do { \
+  do									   \
+    {									   \
 PUT_SCNHDR_NLNNO(ABFD,((struct internal_scnhdr *)(INT))->s_nlnno,\
-                (bfd_byte *)((SCNHDR *)(EXT))->s_nlnno); \
+			((SCNHDR *)(EXT))->s_nlnno);			   \
 PUT_SCNHDR_NRELOC(ABFD,((struct internal_scnhdr *)(INT))->s_nreloc,\
-                (bfd_byte *)((SCNHDR *)(EXT))->s_nreloc); \
+			 ((SCNHDR *)(EXT))->s_nreloc);			   \
 PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \
-                (bfd_byte *)((SCNHDR *)(EXT))->s_flags); \
+			((SCNHDR *)(EXT))->s_flags);			   \
 PUT_SCNHDR_PAGE(ABFD,((struct internal_scnhdr *)(INT))->s_page, \
-                (bfd_byte *)((SCNHDR *)(EXT))->s_page); \
-} while(0)
+		       ((SCNHDR *)(EXT))->s_page);			   \
+    }									   \
+   while (0)
 
 /* Page macros
 
@@ -387,32 +399,37 @@ union external_auxent {
 
 /* section lengths are in target bytes (not host bytes) */
 #define GET_SCN_SCNLEN(ABFD,EXT) \
-(bfd_h_get_32(ABFD,(bfd_byte *)(EXT)->x_scn.x_scnlen)*bfd_octets_per_byte(ABFD))
+  (H_GET_32 (ABFD, (EXT)->x_scn.x_scnlen) * bfd_octets_per_byte (ABFD))
 #define PUT_SCN_SCNLEN(ABFD,INT,EXT) \
-bfd_h_put_32(ABFD,(INT)/bfd_octets_per_byte(ABFD),\
-             (bfd_byte *)(EXT)->x_scn.x_scnlen)
+  H_PUT_32 (ABFD, (INT) / bfd_octets_per_byte (ABFD), (EXT)->x_scn.x_scnlen)
 
 /* lnsz size is in bits in COFF file, in bytes in BFD */
 #define GET_LNSZ_SIZE(abfd, ext) \
-(bfd_h_get_16(abfd, (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_size) / \
- (class != C_FIELD ? 8 : 1))
+ (H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (class != C_FIELD ? 8 : 1))
 
 #define PUT_LNSZ_SIZE(abfd, in, ext) \
- bfd_h_put_16(abfd, ((class != C_FIELD) ? (in)*8 : (in)), \
-              (bfd_byte*) ext->x_sym.x_misc.x_lnsz.x_size)
+  H_PUT_16 (abfd, ((class != C_FIELD) ? (in) * 8 : (in)), \
+	   ext->x_sym.x_misc.x_lnsz.x_size)
  
 /* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes */
 #define COFF_ADJUST_SYM_IN_POST(ABFD,EXT,INT) \
-do { struct internal_syment *dst = (struct internal_syment *)(INT); \
-if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU) dst->n_value /= 8; \
-} while (0)
+  do									\
+    {									\
+      struct internal_syment *dst = (struct internal_syment *)(INT);	\
+      if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU)		\
+	dst->n_value /= 8;						\
+    }									\
+   while (0)
 
 #define COFF_ADJUST_SYM_OUT_POST(ABFD,INT,EXT) \
-do { struct internal_syment *src = (struct internal_syment *)(INT); \
+  do									\
+    {									\
+       struct internal_syment *src = (struct internal_syment *)(INT);	\
 SYMENT *dst = (SYMENT *)(EXT); \
 if(src->n_sclass == C_MOU || src->n_sclass == C_MOS) \
-bfd_h_put_32(abfd,src->n_value * 8,(bfd_byte *)dst->e_value); \
-} while (0)
+	 H_PUT_32 (abfd, src->n_value * 8, dst->e_value);		\
+    }									\
+   while (0)
 
 /* Detect section-relative absolute symbols so they get flagged with a sym
    index of -1.
Index: include/coff/xcoff.h
===================================================================
RCS file: /cvs/src/src/include/coff/xcoff.h,v
retrieving revision 1.3
diff -u -p -w -r1.3 xcoff.h

white space changes

Index: include/elf/internal.h
===================================================================
RCS file: /cvs/src/src/include/elf/internal.h,v
retrieving revision 1.3
diff -u -p -w -r1.3 internal.h
--- internal.h	2001/03/14 02:27:44	1.3
+++ internal.h	2001/09/17 09:28:56
@@ -153,7 +153,7 @@ typedef struct elf_internal_rel {
 typedef struct elf_internal_rela {
   bfd_vma	r_offset;	/* Location at which to apply the action */
   bfd_vma	r_info;		/* Index and Type of relocation */
-  bfd_signed_vma r_addend;	/* Constant addend used to compute value */
+  bfd_vma	r_addend;	/* Constant addend used to compute value */
 } Elf_Internal_Rela;
 
 #define elf32_internal_rela elf_internal_rela


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