diff options
author | Timothy Pearson <[email protected]> | 2014-12-27 08:13:20 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2014-12-27 08:13:20 -0600 |
commit | 9b92536e6c51b66406d593745a938975e226f95e (patch) | |
tree | a40b0066dc774827f602f5e372c2f53656007553 /src/libr-bfd.h | |
download | libr-9b92536e6c51b66406d593745a938975e226f95e.tar.gz libr-9b92536e6c51b66406d593745a938975e226f95e.zip |
Initial import
Diffstat (limited to 'src/libr-bfd.h')
-rw-r--r-- | src/libr-bfd.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/libr-bfd.h b/src/libr-bfd.h new file mode 100644 index 0000000..7b6ea3e --- /dev/null +++ b/src/libr-bfd.h @@ -0,0 +1,40 @@ +#ifndef __LIBR_BFD_H +#define __LIBR_BFD_H + +#include "config.h" + +#include <sys/types.h> +#include <stdint.h> +#include <bfd.h> + +#if BFD_HOST_64BIT_LONG + #if defined(__i386) + #error "Using incorrect binutils header file for architecture." + #endif +#else + #if defined(__amd64) + #error "Using incorrect binutils header file for architecture." + #endif +#endif + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + +typedef struct _libr_file { + int fd_handle; + bfd *bfd_read; + bfd *bfd_write; + char *filename; + mode_t filemode; + uid_t fileowner; + gid_t filegroup; + char tempfile[LIBR_TEMPFILE_LEN]; + libr_access_t access; +} libr_file; + +#endif /* DOXYGEN_SHOULD_SKIP_THIS */ + +/* for a clean internal API */ +typedef asection libr_section; +typedef void libr_data; + +#endif /* __LIBR_BFD_H */ |