bfd_put_size
............

bfd_get_size
............

These macros as used for reading and writing raw data in sections; each access (except for bytes) is vectored through the target format of the BFD and mangled accordingly. The mangling performs any necessary endian translations and removes alignment restrictions.

     #define bfd_put_8(abfd, val, ptr) \
                     (*((char *)ptr) = (char)val)
     #define bfd_get_8(abfd, ptr) \
                     (*((char *)ptr))
     #define bfd_put_16(abfd, val, ptr) \
                     BFD_SEND(abfd, bfd_putx16, (val,ptr))
     #define bfd_get_16(abfd, ptr) \
                     BFD_SEND(abfd, bfd_getx16, (ptr))
     #define bfd_put_32(abfd, val, ptr) \
                     BFD_SEND(abfd, bfd_putx32, (val,ptr))
     #define bfd_get_32(abfd, ptr) \
                     BFD_SEND(abfd, bfd_getx32, (ptr))
     #define bfd_put_64(abfd, val, ptr) \
                     BFD_SEND(abfd, bfd_putx64, (val, ptr))
     #define bfd_get_64(abfd, ptr) \
                     BFD_SEND(abfd, bfd_getx64, (ptr))

*-*/

bfd_h_put_size
..............

bfd_h_get_size
..............

These macros have the same function as their bfd_get_x bretherin, except that they are used for removing information for the header records of object files. Believe it or not, some object files keep their header records in big endian order, and their data in little endan order.

     #define bfd_h_put_8(abfd, val, ptr) \
                     (*((char *)ptr) = (char)val)
     #define bfd_h_get_8(abfd, ptr) \
                     (*((char *)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))
     #define bfd_h_put_32(abfd, val, ptr) \
                     BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
     #define bfd_h_get_32(abfd, ptr) \
                     BFD_SEND(abfd, bfd_h_getx32,(ptr))
     #define bfd_h_put_64(abfd, val, ptr) \
                     BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
     #define bfd_h_get_64(abfd, ptr) \
                     BFD_SEND(abfd, bfd_h_getx64,(ptr))

*-*/

bfd_log2
........

Return the log base 2 of the value supplied, rounded up. eg an arg of 1025 would return 11.

     bfd_vma bfd_log2(bfd_vma x);