| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
#ifndef _ELF32_M68HC1X_H |
| 22 |
#define _ELF32_M68HC1X_H |
| 23 |
|
| 24 |
#include "elf-bfd.h" |
| 25 |
#include "bfdlink.h" |
| 26 |
#include "elf/m68hc11.h" |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
#define BFD_M68HC11_BANK_START_NAME "__bank_start" |
| 31 |
#define BFD_M68HC11_BANK_SIZE_NAME "__bank_size" |
| 32 |
#define BFD_M68HC11_BANK_VIRTUAL_NAME "__bank_virtual" |
| 33 |
|
| 34 |
|
| 35 |
extern bfd_boolean _bfd_m68hc11_elf_merge_private_bfd_data (bfd*,bfd*); |
| 36 |
extern bfd_boolean _bfd_m68hc11_elf_set_private_flags (bfd*,flagword); |
| 37 |
extern bfd_boolean _bfd_m68hc11_elf_print_private_bfd_data (bfd*, void*); |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
struct elf32_m68hc11_stub_hash_entry { |
| 45 |
|
| 46 |
|
| 47 |
struct bfd_hash_entry root; |
| 48 |
|
| 49 |
|
| 50 |
asection *stub_sec; |
| 51 |
|
| 52 |
|
| 53 |
bfd_vma stub_offset; |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
bfd_vma target_value; |
| 58 |
asection *target_section; |
| 59 |
}; |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
struct m68hc11_page_info |
| 89 |
{ |
| 90 |
bfd_vma bank_virtual; |
| 91 |
bfd_vma bank_physical; |
| 92 |
bfd_vma bank_physical_end; |
| 93 |
bfd_vma bank_mask; |
| 94 |
bfd_vma bank_size; |
| 95 |
int bank_shift; |
| 96 |
int bank_param_initialized; |
| 97 |
bfd_vma trampoline_addr; |
| 98 |
}; |
| 99 |
|
| 100 |
struct m68hc11_elf_link_hash_table |
| 101 |
{ |
| 102 |
struct elf_link_hash_table root; |
| 103 |
struct m68hc11_page_info pinfo; |
| 104 |
|
| 105 |
|
| 106 |
struct bfd_hash_table* stub_hash_table; |
| 107 |
|
| 108 |
|
| 109 |
bfd *stub_bfd; |
| 110 |
|
| 111 |
asection* stub_section; |
| 112 |
asection* tramp_section; |
| 113 |
|
| 114 |
|
| 115 |
asection * (*add_stub_section) PARAMS ((const char *, asection *)); |
| 116 |
|
| 117 |
|
| 118 |
unsigned int bfd_count; |
| 119 |
int top_index; |
| 120 |
asection **input_list; |
| 121 |
|
| 122 |
|
| 123 |
struct sym_sec_cache sym_sec; |
| 124 |
|
| 125 |
bfd_boolean (* size_one_stub) PARAMS((struct bfd_hash_entry*, void*)); |
| 126 |
bfd_boolean (* build_one_stub) PARAMS((struct bfd_hash_entry*, void*)); |
| 127 |
}; |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
#define m68hc11_elf_hash_table(p) \ |
| 132 |
((struct m68hc11_elf_link_hash_table *) ((p)->hash)) |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
extern struct m68hc11_elf_link_hash_table* m68hc11_elf_hash_table_create |
| 137 |
(bfd*); |
| 138 |
extern void m68hc11_elf_bfd_link_hash_table_free (struct bfd_link_hash_table*); |
| 139 |
|
| 140 |
extern void m68hc11_elf_get_bank_parameters (struct bfd_link_info*); |
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
extern int m68hc11_addr_is_banked (struct m68hc11_page_info*, bfd_vma); |
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
extern bfd_vma m68hc11_phys_addr (struct m68hc11_page_info*, bfd_vma); |
| 149 |
|
| 150 |
|
| 151 |
extern bfd_vma m68hc11_phys_page (struct m68hc11_page_info*, bfd_vma); |
| 152 |
|
| 153 |
bfd_reloc_status_type m68hc11_elf_ignore_reloc |
| 154 |
(bfd *abfd, arelent *reloc_entry, |
| 155 |
asymbol *symbol, void *data, asection *input_section, |
| 156 |
bfd *output_bfd, char **error_message); |
| 157 |
bfd_reloc_status_type m68hc11_elf_special_reloc |
| 158 |
(bfd *abfd, arelent *reloc_entry, |
| 159 |
asymbol *symbol, void *data, asection *input_section, |
| 160 |
bfd *output_bfd, char **error_message); |
| 161 |
|
| 162 |
|
| 163 |
asection *elf32_m68hc11_gc_mark_hook |
| 164 |
(asection *sec, struct bfd_link_info *info, |
| 165 |
Elf_Internal_Rela *rel, struct elf_link_hash_entry *h, |
| 166 |
Elf_Internal_Sym *sym); |
| 167 |
bfd_boolean elf32_m68hc11_gc_sweep_hook |
| 168 |
(bfd *abfd, struct bfd_link_info *info, |
| 169 |
asection *sec, const Elf_Internal_Rela *relocs); |
| 170 |
bfd_boolean elf32_m68hc11_check_relocs |
| 171 |
(bfd * abfd, struct bfd_link_info * info, |
| 172 |
asection * sec, const Elf_Internal_Rela * relocs); |
| 173 |
bfd_boolean elf32_m68hc11_relocate_section |
| 174 |
(bfd *output_bfd, struct bfd_link_info *info, |
| 175 |
bfd *input_bfd, asection *input_section, |
| 176 |
bfd_byte *contents, Elf_Internal_Rela *relocs, |
| 177 |
Elf_Internal_Sym *local_syms, asection **local_sections); |
| 178 |
|
| 179 |
bfd_boolean elf32_m68hc11_add_symbol_hook |
| 180 |
(bfd *abfd, struct bfd_link_info *info, |
| 181 |
Elf_Internal_Sym *sym, const char **namep, |
| 182 |
flagword *flagsp, asection **secp, |
| 183 |
bfd_vma *valp); |
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
extern void elf32_m68hc11_post_process_headers (bfd*, struct bfd_link_info*); |
| 188 |
|
| 189 |
int elf32_m68hc11_setup_section_lists (bfd *, struct bfd_link_info *); |
| 190 |
|
| 191 |
bfd_boolean elf32_m68hc11_size_stubs |
| 192 |
(bfd *, bfd *, struct bfd_link_info *, |
| 193 |
asection * (*) (const char *, asection *)); |
| 194 |
|
| 195 |
bfd_boolean elf32_m68hc11_build_stubs (bfd* abfd, struct bfd_link_info *); |
| 196 |
#endif |