Update to match bfd changes.

This commit is contained in:
John Gilmore 1993-04-21 09:36:51 +00:00
parent 5e6d9f49be
commit 236e2916a4

View File

@ -377,60 +377,84 @@ bfd_alloc_size PARAMS ((bfd *abfd));
bfd * bfd *
bfd_create PARAMS ((CONST char *filename, bfd *template)); bfd_create PARAMS ((CONST char *filename, bfd *template));
/* Byte swapping macros for user section data. */
#define bfd_put_8(abfd, val, ptr) \ #define bfd_put_8(abfd, val, ptr) \
(*((unsigned char *)ptr) = (unsigned char)val) (*((unsigned char *)(ptr)) = (unsigned char)val)
#define bfd_put_signed_8(abfd, val, ptr) (*((char *)(ptr)) = (char)(val)) #define bfd_put_signed_8 \
bfd_put_8
#define bfd_get_8(abfd, ptr) \ #define bfd_get_8(abfd, ptr) \
(*((unsigned char *)(ptr))) (*(unsigned char *)(ptr))
#define bfd_get_signed_8(abfd, ptr) (((*(char *)(ptr) ^ 0x80) & 0xff) - 0x80) #define bfd_get_signed_8(abfd, ptr) \
((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
#define bfd_put_16(abfd, val, ptr) \ #define bfd_put_16(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx16, ((val),(ptr))) BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
#define bfd_put_signed_16 bfd_put_16 #define bfd_put_signed_16 \
bfd_put_16
#define bfd_get_16(abfd, ptr) \ #define bfd_get_16(abfd, ptr) \
BFD_SEND(abfd, bfd_getx16, (ptr)) BFD_SEND(abfd, bfd_getx16, (ptr))
#define bfd_get_signed_16(abfd, ptr) \ #define bfd_get_signed_16(abfd, ptr) \
BFD_SEND (abfd, bfd_getx_signed_16, (ptr)) BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
#define bfd_put_32(abfd, val, ptr) \ #define bfd_put_32(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx32, ((val),(ptr))) BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
#define bfd_put_signed_32 bfd_put_32 #define bfd_put_signed_32 \
bfd_put_32
#define bfd_get_32(abfd, ptr) \ #define bfd_get_32(abfd, ptr) \
BFD_SEND(abfd, bfd_getx32, (ptr)) BFD_SEND(abfd, bfd_getx32, (ptr))
#define bfd_get_signed_32(abfd, ptr) \ #define bfd_get_signed_32(abfd, ptr) \
BFD_SEND(abfd, bfd_getx_signed_32, (ptr)) BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
#define bfd_put_64(abfd, val, ptr) \ #define bfd_put_64(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx64, ((val), (ptr))) BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
#define bfd_put_signed_64 bfd_put_64 #define bfd_put_signed_64 \
bfd_put_64
#define bfd_get_64(abfd, ptr) \ #define bfd_get_64(abfd, ptr) \
BFD_SEND(abfd, bfd_getx64, (ptr)) BFD_SEND(abfd, bfd_getx64, (ptr))
#define bfd_get_signed_64(abfd, ptr) \ #define bfd_get_signed_64(abfd, ptr) \
BFD_SEND(abfd, bfd_getx_signed_64, (ptr)) BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
/* Byte swapping macros for file header data. */
#define bfd_h_put_8(abfd, val, ptr) \ #define bfd_h_put_8(abfd, val, ptr) \
(*((unsigned char *)ptr) = (unsigned char)val) bfd_put_8 (abfd, val, ptr)
#define bfd_h_put_signed_8(abfd, val, ptr) (*((char *)(ptr)) = (char)(val)) #define bfd_h_put_signed_8(abfd, val, ptr) \
bfd_put_8 (abfd, val, ptr)
#define bfd_h_get_8(abfd, ptr) \ #define bfd_h_get_8(abfd, ptr) \
(*((unsigned char *)(ptr))) bfd_get_8 (abfd, ptr)
#define bfd_h_get_signed_8 bfd_get_signed_8 #define bfd_h_get_signed_8(abfd, ptr) \
bfd_get_signed_8 (abfd, ptr)
#define bfd_h_put_16(abfd, val, ptr) \ #define bfd_h_put_16(abfd, val, ptr) \
BFD_SEND(abfd, bfd_h_putx16,(val,ptr)) BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
#define bfd_h_put_signed_16 bfd_h_put_16 #define bfd_h_put_signed_16 \
bfd_h_put_16
#define bfd_h_get_16(abfd, ptr) \ #define bfd_h_get_16(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx16,(ptr)) BFD_SEND(abfd, bfd_h_getx16,(ptr))
#define bfd_h_get_signed_16(abfd, ptr) \ #define bfd_h_get_signed_16(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr)) BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
#define bfd_h_put_32(abfd, val, ptr) \ #define bfd_h_put_32(abfd, val, ptr) \
BFD_SEND(abfd, bfd_h_putx32,(val,ptr)) BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
#define bfd_h_put_signed_32 bfd_h_put_32 #define bfd_h_put_signed_32 \
bfd_h_put_32
#define bfd_h_get_32(abfd, ptr) \ #define bfd_h_get_32(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx32,(ptr)) BFD_SEND(abfd, bfd_h_getx32,(ptr))
#define bfd_h_get_signed_32(abfd, ptr) \ #define bfd_h_get_signed_32(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr)) BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
#define bfd_h_put_64(abfd, val, ptr) \ #define bfd_h_put_64(abfd, val, ptr) \
BFD_SEND(abfd, bfd_h_putx64,(val, ptr)) BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
#define bfd_h_put_signed_64 bfd_h_put_64 #define bfd_h_put_signed_64 \
bfd_h_put_64
#define bfd_h_get_64(abfd, ptr) \ #define bfd_h_get_64(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx64,(ptr)) BFD_SEND(abfd, bfd_h_getx64,(ptr))
#define bfd_h_get_signed_64(abfd, ptr) \ #define bfd_h_get_signed_64(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr)) BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
typedef struct sec typedef struct sec
{ {
/* The name of the section, the name isn't a copy, the pointer is /* The name of the section, the name isn't a copy, the pointer is