Support multiple ksplice modules in ksplice-apply.
[ksplice.git] / objcommon.h
blobdef25f0fb00d4e1668ea507233110b216ce20ca5
1 #include "kmodsrc/allcommon.h"
2 #include <bfd.h>
3 #include <stdio.h>
5 #define DIE do { printf("ksplice: died at line %d of %s\n", __LINE__, __FILE__); fflush(0); exit(1); } while(0)
6 #define assert(x) do { if(!(x)) DIE; } while(0)
7 #define align(x, n) ((((x)+(n)-1)/(n))*(n))
9 #ifndef bfd_get_section_size
10 #define bfd_get_section_size(x) ((x)->_cooked_size)
11 #endif
13 struct supersect {
14 bfd *parent;
15 char *name;
16 void *contents;
17 int contents_size;
18 arelent **relocs;
19 int num_relocs;
20 struct supersect *next;
23 long get_syms(bfd *abfd, asymbol ***syms_ptr);
24 struct supersect *fetch_supersect(bfd *abfd, asection *sect, asymbol **sympp);