Move ksplice_reloc generation into objmanip.
[ksplice.git] / objmanip.h
blob16865219fa07327ddaff4d2762c51ee77afadc55
1 struct wsect {
2 char *name;
3 struct wsect *next;
4 };
6 struct specsect {
7 char *sectname;
8 unsigned char odd_relocs;
9 char *odd_relocname;
10 int entry_size;
13 struct ksplice_reloc {
14 char *sym_name;
15 char *blank_sect_name;
16 long blank_sect_addr;
17 long blank_offset;
18 long num_sym_addrs;
19 long *sym_addrs;
20 int pcrel;
21 long addend;
22 long size;
25 int main(int argc, char **argv);
26 void rm_some_relocs(bfd *ibfd, asection *isection);
27 void write_ksplice_reloc(bfd *ibfd, asection *isection, arelent *orig_reloc,
28 struct supersect *ss);
29 int blot_section(bfd *abfd, asection *sect, int offset, int size);
30 asymbol **canonical_sym(const char *sect_wlabel);
31 void rm_from_special(bfd *ibfd, struct specsect *s);
32 void mark_wanted_if_referenced(bfd *abfd, asection *sect, void *ignored);
33 void check_for_ref_to_section(bfd *abfd, asection *looking_at,
34 void *looking_for);
35 static bfd_boolean copy_object(bfd *ibfd, bfd *obfd);
36 static void setup_section(bfd *ibfd, asection *isection, void *obfdarg);
37 static void setup_new_section(bfd *obfd, struct supersect *ss);
38 static void copy_section(bfd *ibfd, asection *isection, void *obfdarg);
39 static void write_new_section(bfd *obfd, struct supersect *ss);
40 static void mark_symbols_used_in_relocations(bfd *ibfd, asection *isection,
41 void *symbolsarg);
42 static void ss_mark_symbols_used_in_relocations(struct supersect *ss);
43 static void filter_symbols(bfd *abfd, bfd *obfd, struct asymbolp_vec *osyms,
44 struct asymbolp_vec *isyms);
45 int exists_sym_with_name(struct asymbolp_vec *syms, const char *desired);
46 int match_varargs(const char *str);
47 int want_section(const char *name, char **newname);
48 struct specsect *is_special(const char *name);