* elflink.h (elf_link_create_dynamic_sections): Handle non-standard
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index 78cadabc45b3ebf4b9e60b554692e00cb552c9e2..aa20c0817cd03b4c7e22d21b6ad372d519d2c9dd 100644 (file)
@@ -803,6 +803,20 @@ bfd_make_readable PARAMS ((bfd *abfd));
 #define bfd_get_signed_64(abfd, ptr) \
                 BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
 
+#define bfd_get(bits, abfd, ptr)                               \
+                ((bits) == 8 ? bfd_get_8 (abfd, ptr)           \
+                : (bits) == 16 ? bfd_get_16 (abfd, ptr)        \
+                : (bits) == 32 ? bfd_get_32 (abfd, ptr)        \
+                : (bits) == 64 ? bfd_get_64 (abfd, ptr)        \
+                : (abort (), (bfd_vma) - 1))
+
+#define bfd_put(bits, abfd, val, ptr)                          \
+                ((bits) == 8 ? bfd_put_8 (abfd, val, ptr)      \
+                : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)   \
+                : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)   \
+                : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)   \
+                : (abort (), (void) 0))
+
 
  /* Byte swapping macros for file header data.  */
 
This page took 0.025254 seconds and 4 git commands to generate.