Add the target module name to module_pack.
[ksplice.git] / objmanip.h
blobd52b7fabd6423ce4418fad74d4f264264a98155b
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 long blank_addr;
16 long blank_offset;
17 long num_sym_addrs;
18 long *sym_addrs;
19 int pcrel;
20 long addend;
21 long size;
24 struct ksplice_size {
25 char *name;
26 long size;
27 long thismod_addr;
28 long num_sym_addrs;
29 long *sym_addrs;
32 struct ksplice_patch {
33 char *oldstr;
34 char *replstr;
35 long oldaddr;
36 long repladdr;
37 char *saved;
40 int main(int argc, char **argv);
41 void rm_some_relocs(bfd *ibfd, asection *isection);
42 void write_ksplice_reloc(bfd *ibfd, asection *isection, arelent *orig_reloc,
43 struct supersect *ss);
44 int blot_section(bfd *abfd, asection *sect, int offset, int size);
45 void write_ksplice_size(bfd *ibfd, asymbol **symp);
46 void write_ksplice_patch(bfd *ibfd, char *symname);
47 void rm_from_special(bfd *ibfd, struct specsect *s);
48 void mark_wanted_if_referenced(bfd *abfd, asection *sect, void *ignored);
49 void check_for_ref_to_section(bfd *abfd, asection *looking_at,
50 void *looking_for);
51 static bfd_boolean copy_object(bfd *ibfd, bfd *obfd);
52 static void setup_section(bfd *ibfd, asection *isection, void *obfdarg);
53 static void setup_new_section(bfd *obfd, struct supersect *ss);
54 static void copy_section(bfd *ibfd, asection *isection, void *obfdarg);
55 static void write_new_section(bfd *obfd, struct supersect *ss);
56 static void mark_symbols_used_in_relocations(bfd *ibfd, asection *isection,
57 void *symbolsarg);
58 static void ss_mark_symbols_used_in_relocations(struct supersect *ss);
59 static void filter_symbols(bfd *abfd, bfd *obfd, struct asymbolp_vec *osyms,
60 struct asymbolp_vec *isyms);
61 int exists_sym_with_name(struct asymbolp_vec *syms, const char *desired);
62 int match_varargs(const char *str);
63 int want_section(const char *name, char **newname);
64 struct specsect *is_special(const char *name);