aboutsummaryrefslogtreecommitdiffstats
path: root/bfd/main.c
blob: 97fbc4707ae454ebf553d10a7c7d012de7f6ce6e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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*/