aboutsummaryrefslogtreecommitdiffstats
path: root/bfd/main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bfd/main.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/bfd/main.c b/bfd/main.c
new file mode 100644
index 0000000..97fbc47
--- /dev/null
+++ b/bfd/main.c
@@ -0,0 +1,24 @@
+
+/*intentionally left blank*/
+#include "bfd.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+bfd* dobfd(const char* __filename, const char* __target) {
+ bfd* abfd;
+ bfd_init();
+
+ abfd = bfd_openr(__filename, __target);
+ if (abfd) return abfd;
+ else return NULL;
+}
+
+int main(int argv, char** argc) {
+ bfd* abfd = dobfd("../mutator-lvl0", "default");
+ if (abfd) {
+ printf("bfd section count is %d.\n", bfd_count_sections(abfd));
+ }
+ return 0;
+}
+/*intentionally left blank*/
+