[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Description
This file contains various routines which are used within BFD.
They are not intended for export, but are documented here for
completeness.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bfd_xmalloc
Synopsis
PTR bfd_xmalloc( bfd_size_type size);
Description
Like malloc, but exit if no more memory.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bfd_write_bigendian_4byte_int
Synopsis
void bfd_write_bigendian_4byte_int(bfd *abfd, int i);
Description
Writes a 4 byte integer to the outputing bfd, in big endian
mode regardless of what else is going on. This is usefull in
archives.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bfd_put_size
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bfd_get_size
Description
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))
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bfd_h_put_size
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bfd_h_get_size
Description
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))
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bfd_log2
Description
Return the log base 2 of the value supplied, rounded up. eg an
arg of 1025 would return 11.
Synopsis
bfd_vma bfd_log2(bfd_vma x);
[Top] | [Contents] | [Index] | [ ? ] |
This document was generated on December 11, 2024 using texi2html 5.0.
The buttons in the navigation panels have the following meaning:
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ << ] | FastBack | Beginning of this chapter or previous chapter | 1 |
[ < ] | Back | Previous section in reading order | 1.2.2 |
[ Up ] | Up | Up section | 1.2 |
[ > ] | Forward | Next section in reading order | 1.2.4 |
[ >> ] | FastForward | Next chapter | 2 |
[Top] | Top | Cover (top) of document | |
[Contents] | Contents | Table of contents | |
[Index] | Index | Index | |
[ ? ] | About | About (help) |
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
This document was generated on December 11, 2024 using texi2html 5.0.