| /freebsd-11-stable/contrib/binutils/bfd/ |
| HD | cache.c | 81 insert (bfd *abfd) in insert() argument 85 abfd->lru_next = abfd; in insert() 86 abfd->lru_prev = abfd; in insert() 90 abfd->lru_next = bfd_last_cache; in insert() 91 abfd->lru_prev = bfd_last_cache->lru_prev; in insert() 92 abfd->lru_prev->lru_next = abfd; in insert() 93 abfd->lru_next->lru_prev = abfd; in insert() 95 bfd_last_cache = abfd; in insert() 101 snip (bfd *abfd) in snip() argument 103 abfd->lru_prev->lru_next = abfd->lru_next; in snip() [all …]
|
| HD | coffswap.h | 32 #define GET_FCN_LNNOPTR(abfd, ext) \ argument 33 H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr) 37 #define GET_FCN_ENDNDX(abfd, ext) \ argument 38 H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_endndx) 42 #define PUT_FCN_LNNOPTR(abfd, in, ext) \ argument 43 H_PUT_32 (abfd, in, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr) 46 #define PUT_FCN_ENDNDX(abfd, in, ext) \ argument 47 H_PUT_32 (abfd, in, ext->x_sym.x_fcnary.x_fcn.x_endndx) 50 #define GET_LNSZ_LNNO(abfd, ext) \ argument 51 H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno) [all …]
|
| HD | bfdio.c | 113 bfd_bread (void *ptr, bfd_size_type size, bfd *abfd) in bfd_bread() argument 119 if (abfd->arelt_data != NULL) in bfd_bread() 121 size_t maxbytes = ((struct areltdata *) abfd->arelt_data)->parsed_size; in bfd_bread() 126 if ((abfd->flags & BFD_IN_MEMORY) != 0) in bfd_bread() 131 bim = abfd->iostream; in bfd_bread() 133 if (abfd->where + get > bim->size) in bfd_bread() 135 if (bim->size < (bfd_size_type) abfd->where) in bfd_bread() 138 get = bim->size - abfd->where; in bfd_bread() 141 memcpy (ptr, bim->buffer + abfd->where, (size_t) get); in bfd_bread() 142 abfd->where += get; in bfd_bread() [all …]
|
| HD | ecoffswap.h | 98 ecoff_swap_hdr_in (bfd *abfd, void * ext_copy, HDRR *intern) in ecoff_swap_hdr_in() argument 104 intern->magic = H_GET_S16 (abfd, ext->h_magic); in ecoff_swap_hdr_in() 105 intern->vstamp = H_GET_S16 (abfd, ext->h_vstamp); in ecoff_swap_hdr_in() 106 intern->ilineMax = H_GET_32 (abfd, ext->h_ilineMax); in ecoff_swap_hdr_in() 107 intern->cbLine = ECOFF_GET_OFF (abfd, ext->h_cbLine); in ecoff_swap_hdr_in() 108 intern->cbLineOffset = ECOFF_GET_OFF (abfd, ext->h_cbLineOffset); in ecoff_swap_hdr_in() 109 intern->idnMax = H_GET_32 (abfd, ext->h_idnMax); in ecoff_swap_hdr_in() 110 intern->cbDnOffset = ECOFF_GET_OFF (abfd, ext->h_cbDnOffset); in ecoff_swap_hdr_in() 111 intern->ipdMax = H_GET_32 (abfd, ext->h_ipdMax); in ecoff_swap_hdr_in() 112 intern->cbPdOffset = ECOFF_GET_OFF (abfd, ext->h_cbPdOffset); in ecoff_swap_hdr_in() [all …]
|
| HD | aoutf1.h | 98 sunos_set_arch_mach (bfd *abfd, enum machine_type machtype) in sunos_set_arch_mach() argument 156 bfd_set_arch_mach (abfd, arch, machine); in sunos_set_arch_mach() 166 choose_reloc_size (bfd *abfd) in choose_reloc_size() argument 168 switch (bfd_get_arch (abfd)) in choose_reloc_size() 171 obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE; in choose_reloc_size() 174 obj_reloc_entry_size (abfd) = RELOC_STD_SIZE; in choose_reloc_size() 186 sunos_write_object_contents (bfd *abfd) in sunos_write_object_contents() argument 189 struct internal_exec *execp = exec_hdr (abfd); in sunos_write_object_contents() 192 switch (bfd_get_arch (abfd)) in sunos_write_object_contents() 195 switch (bfd_get_mach (abfd)) in sunos_write_object_contents() [all …]
|
| HD | bfd.c | 530 bfd *abfd = va_arg (ap, bfd *); in _bfd_default_error_handler() local 532 if (abfd == NULL) in _bfd_default_error_handler() 535 else if (abfd->my_archive) in _bfd_default_error_handler() 537 abfd->my_archive->filename, abfd->filename); in _bfd_default_error_handler() 539 snprintf (bufp, avail, "%s", abfd->filename); in _bfd_default_error_handler() 544 bfd *abfd; in _bfd_default_error_handler() local 551 abfd = sec->owner; in _bfd_default_error_handler() 552 if (abfd != NULL in _bfd_default_error_handler() 553 && bfd_get_flavour (abfd) == bfd_target_elf_flavour in _bfd_default_error_handler() 557 else if (abfd != NULL in _bfd_default_error_handler() [all …]
|
| HD | opncls.c | 116 _bfd_delete_bfd (bfd *abfd) in _bfd_delete_bfd() argument 118 if (abfd->memory) in _bfd_delete_bfd() 120 bfd_hash_table_free (&abfd->section_htab); in _bfd_delete_bfd() 121 objalloc_free ((struct objalloc *) abfd->memory); in _bfd_delete_bfd() 123 free (abfd); in _bfd_delete_bfd() 129 _bfd_free_cached_info (bfd *abfd) in _bfd_free_cached_info() argument 131 if (abfd->memory) in _bfd_free_cached_info() 133 bfd_hash_table_free (&abfd->section_htab); in _bfd_free_cached_info() 134 objalloc_free ((struct objalloc *) abfd->memory); in _bfd_free_cached_info() 136 abfd->sections = NULL; in _bfd_free_cached_info() [all …]
|
| HD | libcoff.h | 175 #define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data) argument 208 #define coff_section_data(abfd, sec) \ argument 228 #define xcoff_section_data(abfd, sec) \ argument 229 ((struct xcoff_section_tdata *) coff_section_data ((abfd), (sec))->tdata) 242 #define pei_section_data(abfd, sec) \ argument 243 ((struct pei_section_tdata *) coff_section_data ((abfd), (sec))->tdata) 732 (bfd *abfd, void *, void *); 806 #define coff_backend_info(abfd) \ argument 807 ((bfd_coff_backend_data *) (abfd)->xvec->backend_data) 818 #define bfd_coff_swap_reloc_out(abfd, i, o) \ argument [all …]
|
| HD | peXXigen.c | 95 _bfd_XXi_swap_sym_in (bfd * abfd, void * ext1, void * in1) in _bfd_XXi_swap_sym_in() argument 103 in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset); in _bfd_XXi_swap_sym_in() 108 in->n_value = H_GET_32 (abfd, ext->e_value); in _bfd_XXi_swap_sym_in() 109 in->n_scnum = H_GET_16 (abfd, ext->e_scnum); in _bfd_XXi_swap_sym_in() 112 in->n_type = H_GET_16 (abfd, ext->e_type); in _bfd_XXi_swap_sym_in() 114 in->n_type = H_GET_32 (abfd, ext->e_type); in _bfd_XXi_swap_sym_in() 116 in->n_sclass = H_GET_8 (abfd, ext->e_sclass); in _bfd_XXi_swap_sym_in() 117 in->n_numaux = H_GET_8 (abfd, ext->e_numaux); in _bfd_XXi_swap_sym_in() 137 for (sec = abfd->sections; sec; sec = sec->next) in _bfd_XXi_swap_sym_in() 154 for (sec = abfd->sections; sec; sec = sec->next) in _bfd_XXi_swap_sym_in() [all …]
|
| HD | srec.c | 193 srec_mkobject (bfd *abfd) in srec_mkobject() argument 199 tdata = bfd_alloc (abfd, sizeof (tdata_type)); in srec_mkobject() 203 abfd->tdata.srec_data = tdata; in srec_mkobject() 218 srec_get_byte (bfd *abfd, bfd_boolean *errorptr) in srec_get_byte() argument 222 if (bfd_bread (&c, (bfd_size_type) 1, abfd) != 1) in srec_get_byte() 237 srec_bad_byte (bfd *abfd, in srec_bad_byte() argument 260 abfd, lineno, buf); in srec_bad_byte() 268 srec_new_symbol (bfd *abfd, const char *name, bfd_vma val) in srec_new_symbol() argument 272 n = bfd_alloc (abfd, sizeof (* n)); in srec_new_symbol() 279 if (abfd->tdata.srec_data->symbols == NULL) in srec_new_symbol() [all …]
|
| HD | ptrace-core.c | 51 const bfd_target *ptrace_unix_core_file_p PARAMS ((bfd *abfd)); 52 char * ptrace_unix_core_file_failing_command PARAMS ((bfd *abfd)); 53 int ptrace_unix_core_file_failing_signal PARAMS ((bfd *abfd)); 58 ptrace_unix_core_file_p (abfd) in ptrace_unix_core_file_p() argument 59 bfd *abfd; in ptrace_unix_core_file_p() 68 val = bfd_bread ((void *)&u, (bfd_size_type) sizeof u, abfd); 82 rawptr = (struct trad_core_struct *) bfd_zalloc (abfd, amt); 87 abfd->tdata.trad_core_data = rawptr; 94 core_stacksec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".stack", 96 if (core_stacksec (abfd) == NULL) [all …]
|
| HD | aoutx.h | 264 NAME (aout, reloc_type_lookup) (bfd *abfd, bfd_reloc_code_real_type code) in NAME() 268 int ext = obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE; in NAME() 271 switch (bfd_get_arch_info (abfd)->bits_per_address) in NAME() 321 NAME (aout, reloc_name_lookup) (bfd *abfd, const char *r_name) in NAME() 326 if (obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE) in NAME() 373 NAME (aout, swap_exec_header_in) (bfd *abfd, in NAME() 383 execp->a_info = H_GET_32 (abfd, bytes->e_info); in NAME() 384 execp->a_text = GET_WORD (abfd, bytes->e_text); in NAME() 385 execp->a_data = GET_WORD (abfd, bytes->e_data); in NAME() 386 execp->a_bss = GET_WORD (abfd, bytes->e_bss); in NAME() [all …]
|
| HD | format.c | 91 bfd_check_format (bfd *abfd, bfd_format format) in bfd_check_format() argument 93 return bfd_check_format_matches (abfd, format, NULL); in bfd_check_format() 117 bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) in bfd_check_format_matches() argument 126 if (!bfd_read_p (abfd) in bfd_check_format_matches() 127 || (unsigned int) abfd->format >= (unsigned int) bfd_type_end) in bfd_check_format_matches() 133 if (abfd->format != bfd_unknown) in bfd_check_format_matches() 134 return abfd->format == format; in bfd_check_format_matches() 138 save_targ = abfd->xvec; in bfd_check_format_matches() 157 abfd->format = format; in bfd_check_format_matches() 160 if (!abfd->target_defaulted) in bfd_check_format_matches() [all …]
|
| HD | coff64-rs6000.c | 243 PARAMS ((bfd *abfd)); 247 PARAMS ((bfd *abfd)); 249 PARAMS ((bfd *abfd)); 279 _bfd_xcoff64_swap_lineno_in (abfd, ext1, in1) in _bfd_xcoff64_swap_lineno_in() argument 280 bfd *abfd; in _bfd_xcoff64_swap_lineno_in() 287 in->l_lnno = H_GET_32 (abfd, (ext->l_lnno)); 289 in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx); 291 in->l_addr.l_paddr = H_GET_64 (abfd, ext->l_addr.l_paddr); 295 _bfd_xcoff64_swap_lineno_out (abfd, inp, outp) in _bfd_xcoff64_swap_lineno_out() argument 296 bfd *abfd; in _bfd_xcoff64_swap_lineno_out() [all …]
|
| HD | coffgen.c | 50 make_a_section_from_file (bfd *abfd, in make_a_section_from_file() argument 62 if (bfd_coff_long_section_names (abfd) in make_a_section_from_file() 75 strings = _bfd_coff_read_string_table (abfd); in make_a_section_from_file() 82 name = bfd_alloc (abfd, (bfd_size_type) strlen (strings) + 1); in make_a_section_from_file() 92 name = bfd_alloc (abfd, (bfd_size_type) sizeof (hdr->s_name) + 1); in make_a_section_from_file() 99 return_section = bfd_make_section_anyway (abfd, name); in make_a_section_from_file() 110 bfd_coff_set_alignment_hook (abfd, return_section, hdr); in make_a_section_from_file() 119 if (! bfd_coff_styp_to_sec_flags_hook (abfd, hdr, name, return_section, in make_a_section_from_file() 143 coff_real_object_p (bfd *abfd, in coff_real_object_p() argument 148 flagword oflags = abfd->flags; in coff_real_object_p() [all …]
|
| HD | elfcode.h | 171 elf_swap_symbol_in (bfd *abfd, in elf_swap_symbol_in() argument 178 int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma; in elf_swap_symbol_in() 180 dst->st_name = H_GET_32 (abfd, src->st_name); in elf_swap_symbol_in() 182 dst->st_value = H_GET_SIGNED_WORD (abfd, src->st_value); in elf_swap_symbol_in() 184 dst->st_value = H_GET_WORD (abfd, src->st_value); in elf_swap_symbol_in() 185 dst->st_size = H_GET_WORD (abfd, src->st_size); in elf_swap_symbol_in() 186 dst->st_info = H_GET_8 (abfd, src->st_info); in elf_swap_symbol_in() 187 dst->st_other = H_GET_8 (abfd, src->st_other); in elf_swap_symbol_in() 188 dst->st_shndx = H_GET_16 (abfd, src->st_shndx); in elf_swap_symbol_in() 193 dst->st_shndx = H_GET_32 (abfd, shndx->est_shndx); in elf_swap_symbol_in() [all …]
|
| HD | elf.c | 61 _bfd_elf_swap_verdef_in (bfd *abfd, in _bfd_elf_swap_verdef_in() argument 65 dst->vd_version = H_GET_16 (abfd, src->vd_version); in _bfd_elf_swap_verdef_in() 66 dst->vd_flags = H_GET_16 (abfd, src->vd_flags); in _bfd_elf_swap_verdef_in() 67 dst->vd_ndx = H_GET_16 (abfd, src->vd_ndx); in _bfd_elf_swap_verdef_in() 68 dst->vd_cnt = H_GET_16 (abfd, src->vd_cnt); in _bfd_elf_swap_verdef_in() 69 dst->vd_hash = H_GET_32 (abfd, src->vd_hash); in _bfd_elf_swap_verdef_in() 70 dst->vd_aux = H_GET_32 (abfd, src->vd_aux); in _bfd_elf_swap_verdef_in() 71 dst->vd_next = H_GET_32 (abfd, src->vd_next); in _bfd_elf_swap_verdef_in() 77 _bfd_elf_swap_verdef_out (bfd *abfd, in _bfd_elf_swap_verdef_out() argument 81 H_PUT_16 (abfd, src->vd_version, dst->vd_version); in _bfd_elf_swap_verdef_out() [all …]
|
| HD | ieee.c | 60 ieee_write_byte (bfd *abfd, int barg) in ieee_write_byte() argument 65 if (bfd_bwrite ((void *) &byte, (bfd_size_type) 1, abfd) != 1) in ieee_write_byte() 71 ieee_write_2bytes (bfd *abfd, int bytes) in ieee_write_2bytes() argument 77 if (bfd_bwrite ((void *) buffer, (bfd_size_type) 2, abfd) != 2) in ieee_write_2bytes() 83 ieee_write_int (bfd *abfd, bfd_vma value) in ieee_write_int() argument 87 if (! ieee_write_byte (abfd, (bfd_byte) value)) in ieee_write_int() 105 if (! ieee_write_byte (abfd, in ieee_write_int() 112 if (! ieee_write_byte (abfd, (bfd_byte) (value >> 24))) in ieee_write_int() 116 if (! ieee_write_byte (abfd, (bfd_byte) (value >> 16))) in ieee_write_int() 120 if (! ieee_write_byte (abfd, (bfd_byte) (value >> 8))) in ieee_write_int() [all …]
|
| HD | peicode.h | 89 bfd * abfd; member 126 coff_swap_reloc_in (bfd * abfd, void * src, void * dst) in coff_swap_reloc_in() argument 131 reloc_dst->r_vaddr = H_GET_32 (abfd, reloc_src->r_vaddr); in coff_swap_reloc_in() 132 reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx); in coff_swap_reloc_in() 133 reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type); in coff_swap_reloc_in() 135 reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset); in coff_swap_reloc_in() 140 coff_swap_reloc_out (bfd * abfd, void * src, void * dst) in coff_swap_reloc_out() argument 145 H_PUT_32 (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr); in coff_swap_reloc_out() 146 H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx); in coff_swap_reloc_out() 147 H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type); in coff_swap_reloc_out() [all …]
|
| HD | bout.c | 79 bout_swap_exec_header_in (bfd *abfd, in bout_swap_exec_header_in() argument 84 execp->a_info = H_GET_32 (abfd, bytes->e_info); in bout_swap_exec_header_in() 85 execp->a_text = GET_WORD (abfd, bytes->e_text); in bout_swap_exec_header_in() 86 execp->a_data = GET_WORD (abfd, bytes->e_data); in bout_swap_exec_header_in() 87 execp->a_bss = GET_WORD (abfd, bytes->e_bss); in bout_swap_exec_header_in() 88 execp->a_syms = GET_WORD (abfd, bytes->e_syms); in bout_swap_exec_header_in() 89 execp->a_entry = GET_WORD (abfd, bytes->e_entry); in bout_swap_exec_header_in() 90 execp->a_trsize = GET_WORD (abfd, bytes->e_trsize); in bout_swap_exec_header_in() 91 execp->a_drsize = GET_WORD (abfd, bytes->e_drsize); in bout_swap_exec_header_in() 92 execp->a_tload = GET_WORD (abfd, bytes->e_tload); in bout_swap_exec_header_in() [all …]
|
| HD | section.c | 746 _bfd_generic_new_section_hook (bfd *abfd, asection *newsect) in _bfd_generic_new_section_hook() argument 748 newsect->symbol = bfd_make_empty_symbol (abfd); in _bfd_generic_new_section_hook() 764 bfd_section_init (bfd *abfd, asection *newsect) in bfd_section_init() argument 769 newsect->index = abfd->section_count; in bfd_section_init() 770 newsect->owner = abfd; in bfd_section_init() 772 if (! BFD_SEND (abfd, _new_section_hook, (abfd, newsect))) in bfd_section_init() 776 abfd->section_count++; in bfd_section_init() 777 bfd_section_list_append (abfd, newsect); in bfd_section_init() 804 bfd_section_list_clear (bfd *abfd) in bfd_section_list_clear() argument 806 abfd->sections = NULL; in bfd_section_list_clear() [all …]
|
| HD | coffcode.h | 590 styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED, in styp_to_sec_flags() 732 handle_COMDAT (bfd * abfd, in handle_COMDAT() argument 762 if (! _bfd_coff_get_external_symbols (abfd)) in handle_COMDAT() 765 esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd); in handle_COMDAT() 766 esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd); in handle_COMDAT() 774 bfd_coff_swap_sym_in (abfd, esym, & isym); in handle_COMDAT() 810 symname = _bfd_coff_internal_syment_name (abfd, &isym, buf); in handle_COMDAT() 850 abfd, symname, name); in handle_COMDAT() 855 bfd_coff_swap_aux_in (abfd, (esym + bfd_coff_symesz (abfd)), in handle_COMDAT() 943 esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); in handle_COMDAT() [all …]
|
| HD | aout-target.h | 39 MY (callback) (bfd *abfd) in MY() 41 struct internal_exec *execp = exec_hdr (abfd); in MY() 46 obj_textsec (abfd)->size = N_TXTSIZE (*execp); in MY() 49 obj_textsec (abfd)->vma = N_TXTADDR (*execp); in MY() 50 obj_datasec (abfd)->vma = N_DATADDR (*execp); in MY() 51 obj_bsssec (abfd)->vma = N_BSSADDR (*execp); in MY() 56 if (aout_backend_info (abfd)->entry_is_text_address in MY() 57 && execp->a_entry > obj_textsec (abfd)->vma) in MY() 61 adjust = execp->a_entry - obj_textsec (abfd)->vma; in MY() 64 obj_textsec (abfd)->vma += adjust; in MY() [all …]
|
| HD | trad-core.c | 65 const bfd_target *trad_unix_core_file_p PARAMS ((bfd *abfd)); 66 char * trad_unix_core_file_failing_command PARAMS ((bfd *abfd)); 67 int trad_unix_core_file_failing_signal PARAMS ((bfd *abfd)); 74 trad_unix_core_file_p (abfd) in trad_unix_core_file_p() argument 75 bfd *abfd; in trad_unix_core_file_p() 86 if (bfd_seek (abfd, (file_ptr) TRAD_CORE_USER_OFFSET, SEEK_SET) != 0) 90 val = bfd_bread ((void *) &u, (bfd_size_type) sizeof u, abfd); 114 if (bfd_stat (abfd, &statbuf) < 0) 153 abfd->tdata.trad_core_data = rawptr; 160 core_stacksec(abfd) = bfd_make_section_anyway_with_flags (abfd, ".stack", [all …]
|
| HD | archive.c | 156 #define ar_padchar(abfd) ((abfd)->xvec->ar_pad_char) argument 157 #define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen) argument 179 _bfd_generic_mkarchive (bfd *abfd) in _bfd_generic_mkarchive() argument 183 abfd->tdata.aout_ar_data = bfd_zalloc (abfd, amt); in _bfd_generic_mkarchive() 184 if (bfd_ardata (abfd) == NULL) in _bfd_generic_mkarchive() 221 bfd_get_next_mapent (bfd *abfd, symindex prev, carsym **entry) in bfd_get_next_mapent() argument 223 if (!bfd_has_map (abfd)) in bfd_get_next_mapent() 233 if (prev >= bfd_ardata (abfd)->symdef_count) in bfd_get_next_mapent() 236 *entry = (bfd_ardata (abfd)->symdefs + prev); in bfd_get_next_mapent() 360 _bfd_generic_read_ar_hdr (bfd *abfd) in _bfd_generic_read_ar_hdr() argument [all …]
|