aboutsummaryrefslogtreecommitdiff
path: root/include/bfd.h
diff options
context:
space:
mode:
authorSteve Chamberlain <steve@cygnus>1991-05-21 16:04:48 +0000
committerSteve Chamberlain <steve@cygnus>1991-05-21 16:04:48 +0000
commit7f3d9f460342d152893103af8abdfc120d523858 (patch)
tree2e095f5bb2d9337a544c0deeefe0e1010911e74b /include/bfd.h
parent3b69c2cc9172685c076216ebb2577d9b86c799ca (diff)
downloadgdb-7f3d9f460342d152893103af8abdfc120d523858.zip
gdb-7f3d9f460342d152893103af8abdfc120d523858.tar.gz
gdb-7f3d9f460342d152893103af8abdfc120d523858.tar.bz2
Removed bfd_h_get_x
Diffstat (limited to 'include/bfd.h')
-rw-r--r--include/bfd.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/bfd.h b/include/bfd.h
index 78bcbbe..90899f5 100644
--- a/include/bfd.h
+++ b/include/bfd.h
@@ -815,35 +815,33 @@ PROTO(boolean, bfd_scan_arch_mach,(CONST char *, enum bfd_architecture *,
#define bfd_h_get_16(abfd, ptr) BFD_SEND(abfd, bfd_h_getx16, \
((bfd_byte *) ptr))
+#define bfd_h_put_16(abfd, val, ptr) BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
+#define bfd_h_get_16(abfd, ptr) BFD_SEND(abfd, bfd_h_getx16,(ptr))
+
/* General purpose one fits all. The do { } while (0) makes a single
statement out of it, for use in things like nested if-statements.
The idea is to create your external ref as a byte array of the
right size eg:
char foo[4];
- char bar[2];
then you may do things like:
bfd_h_put_x(abfd, 1, &foo);
- and bfd_h_get_x(abfd,& bar);
+
*/
#define bfd_h_put_x(abfd, val, ptr) \
do { \
- if (sizeof((ptr)) == LONGLONG_SIZE) \
+ if (sizeof((ptr)) == 8) \
bfd_h_put_64 (abfd, val, (ptr));\
- if (sizeof((ptr)) == LONG_SIZE) \
+ if (sizeof((ptr)) == 4) \
bfd_h_put_32 (abfd, val, (ptr));\
- else if (sizeof((ptr)) == SHORT_SIZE) \
+ else if (sizeof((ptr)) == 2) \
bfd_h_put_16 (abfd, val, (ptr));\
- else if (sizeof((ptr)) == BYTE_SIZE) \
+ else if (sizeof((ptr)) == 1) \
bfd_h_put_8 (abfd, val, (ptr));\
else abort(); } while (0)
-#define bfd_h_get_x(abfd, ptr) \
- ((sizeof((ptr))==LONGLONG_SIZE) ? bfd_h_get_64 (abfd, &(ptr[0])):\
- (sizeof((ptr))==LONG_SIZE) ? bfd_h_get_32 (abfd, &(ptr[0])):\
- (sizeof((ptr))==SHORT_SIZE) ? bfd_h_get_16(abfd, &(ptr[0])):\
- bfd_h_get_8 (abfd, &(ptr[0])))
+
#ifdef GNU960
#define BFD_COFF_FORMAT bfd_target_coff_flavour_enum