Lines Matching refs:htab
354 struct spu_link_hash_table *htab; in spu_elf_link_hash_table_create() local
356 htab = bfd_malloc (sizeof (*htab)); in spu_elf_link_hash_table_create()
357 if (htab == NULL) in spu_elf_link_hash_table_create()
360 if (!_bfd_elf_link_hash_table_init (&htab->elf, abfd, in spu_elf_link_hash_table_create()
364 free (htab); in spu_elf_link_hash_table_create()
369 if (!bfd_hash_table_init (&htab->stub_hash_table, stub_hash_newfunc, in spu_elf_link_hash_table_create()
373 memset (&htab->stub, 0, in spu_elf_link_hash_table_create()
374 sizeof (*htab) - offsetof (struct spu_link_hash_table, stub)); in spu_elf_link_hash_table_create()
376 return &htab->elf.root; in spu_elf_link_hash_table_create()
530 struct spu_link_hash_table *htab = spu_hash_table (info); in spu_elf_create_sections() local
533 htab->stack_analysis = stack_analysis; in spu_elf_create_sections()
534 htab->emit_stack_syms = emit_stack_syms; in spu_elf_create_sections()
599 struct spu_link_hash_table *htab = spu_hash_table (info); in spu_elf_find_overlays() local
658 htab->num_overlays = ovl_index; in spu_elf_find_overlays()
659 htab->num_buf = num_buf; in spu_elf_find_overlays()
670 htab->ovl_region = alloc_sec; in spu_elf_find_overlays()
717 struct spu_link_hash_table *htab, in needs_ovl_stub() argument
720 if (htab->num_overlays == 0) in needs_ovl_stub()
737 && !htab->non_overlay_stubs) in needs_ovl_stub()
858 struct spu_link_hash_table *htab = spu_hash_table (info); in spu_elf_size_stubs() local
864 htab->non_overlay_stubs = non_overlay_stubs; in spu_elf_size_stubs()
865 stubs.stub_hash_table = &htab->stub_hash_table; in spu_elf_size_stubs()
1002 if (!needs_ovl_stub (sym_name, sym_sec, section, htab, in spu_elf_size_stubs()
1011 bfd_hash_lookup (&htab->stub_hash_table, stub_name, in spu_elf_size_stubs()
1059 elf_link_hash_traverse (&htab->elf, allocate_spuear_stubs, &stubs); in spu_elf_size_stubs()
1070 htab->stub = bfd_make_section_anyway_with_flags (ibfd, ".stub", flags); in spu_elf_size_stubs()
1071 *stub = htab->stub; in spu_elf_size_stubs()
1072 if (htab->stub == NULL in spu_elf_size_stubs()
1073 || !bfd_set_section_alignment (ibfd, htab->stub, 2)) in spu_elf_size_stubs()
1078 htab->ovtab = bfd_make_section_anyway_with_flags (ibfd, ".ovtab", flags); in spu_elf_size_stubs()
1079 *ovtab = htab->ovtab; in spu_elf_size_stubs()
1080 if (htab->ovtab == NULL in spu_elf_size_stubs()
1081 || !bfd_set_section_alignment (ibfd, htab->stub, 4)) in spu_elf_size_stubs()
1095 bfd_hash_traverse (&htab->stub_hash_table, populate_stubs, &stubs); in spu_elf_size_stubs()
1123 htab->stub->size += SIZEOF_STUB2; in spu_elf_size_stubs()
1136 stubs.sh[i]->off = htab->stub->size; in spu_elf_size_stubs()
1137 htab->stub->size += SIZEOF_STUB1; in spu_elf_size_stubs()
1143 htab->stub->size += SIZEOF_STUB2; in spu_elf_size_stubs()
1159 htab->ovtab->alignment_power = 4; in spu_elf_size_stubs()
1160 htab->ovtab->size = htab->num_overlays * 16 + htab->num_buf * 4; in spu_elf_size_stubs()
1218 struct spu_link_hash_table *htab = inf; in write_one_stub() local
1219 asection *sec = htab->stub; in write_one_stub()
1241 val = (htab->ovly_load->root.u.def.section->output_section->vma in write_one_stub()
1242 + htab->ovly_load->root.u.def.section->output_offset in write_one_stub()
1243 + htab->ovly_load->root.u.def.value in write_one_stub()
1249 htab->stub_overflow = TRUE; in write_one_stub()
1255 if (htab->emit_stub_syms) in write_one_stub()
1268 h = elf_link_hash_lookup (&htab->elf, name, TRUE, TRUE, FALSE); in write_one_stub()
1294 define_ovtab_symbol (struct spu_link_hash_table *htab, const char *name) in define_ovtab_symbol() argument
1298 h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE); in define_ovtab_symbol()
1306 h->root.u.def.section = htab->ovtab; in define_ovtab_symbol()
1330 struct spu_link_hash_table *htab = spu_hash_table (info); in spu_elf_build_stubs() local
1337 htab->emit_stub_syms = emit_syms; in spu_elf_build_stubs()
1338 htab->stub->contents = bfd_zalloc (htab->stub->owner, htab->stub->size); in spu_elf_build_stubs()
1339 if (htab->stub->contents == NULL) in spu_elf_build_stubs()
1342 h = elf_link_hash_lookup (&htab->elf, "__ovly_load", FALSE, FALSE, FALSE); in spu_elf_build_stubs()
1343 htab->ovly_load = h; in spu_elf_build_stubs()
1359 bfd_hash_traverse (&htab->stub_hash_table, write_one_stub, htab); in spu_elf_build_stubs()
1361 if (htab->stub_overflow) in spu_elf_build_stubs()
1368 htab->ovtab->contents = bfd_zalloc (htab->ovtab->owner, htab->ovtab->size); in spu_elf_build_stubs()
1369 if (htab->ovtab->contents == NULL) in spu_elf_build_stubs()
1373 p = htab->ovtab->contents; in spu_elf_build_stubs()
1374 obfd = htab->ovtab->output_section->owner; in spu_elf_build_stubs()
1383 bfd_put_32 (htab->ovtab->owner, s->vma, p + off); in spu_elf_build_stubs()
1384 bfd_put_32 (htab->ovtab->owner, (s->size + 15) & -16, p + off + 4); in spu_elf_build_stubs()
1388 hi = htab->num_buf; in spu_elf_build_stubs()
1392 if (htab->ovl_region[2 * mid + 1]->vma in spu_elf_build_stubs()
1393 + htab->ovl_region[2 * mid + 1]->size <= s->vma) in spu_elf_build_stubs()
1395 else if (htab->ovl_region[2 * mid]->vma > s->vma) in spu_elf_build_stubs()
1399 bfd_put_32 (htab->ovtab->owner, mid + 1, p + off + 12); in spu_elf_build_stubs()
1408 p = htab->ovtab->contents + htab->num_overlays * 16; in spu_elf_build_stubs()
1409 for (i = 0; i < htab->num_buf; i++) in spu_elf_build_stubs()
1411 bfd_put_32 (htab->ovtab->owner, 0, p); in spu_elf_build_stubs()
1415 h = define_ovtab_symbol (htab, "_ovly_table"); in spu_elf_build_stubs()
1419 h->size = htab->num_overlays * 16; in spu_elf_build_stubs()
1421 h = define_ovtab_symbol (htab, "_ovly_table_end"); in spu_elf_build_stubs()
1424 h->root.u.def.value = htab->num_overlays * 16; in spu_elf_build_stubs()
1427 h = define_ovtab_symbol (htab, "_ovly_buf_table"); in spu_elf_build_stubs()
1430 h->root.u.def.value = htab->num_overlays * 16; in spu_elf_build_stubs()
1431 h->size = htab->num_buf * 4; in spu_elf_build_stubs()
1433 h = define_ovtab_symbol (htab, "_ovly_buf_table_end"); in spu_elf_build_stubs()
1436 h->root.u.def.value = htab->num_overlays * 16 + htab->num_buf * 4; in spu_elf_build_stubs()
1439 h = define_ovtab_symbol (htab, "_EAR_"); in spu_elf_build_stubs()
2086 interesting_section (asection *s, bfd *obfd, struct spu_link_hash_table *htab) in interesting_section() argument
2088 return (s != htab->stub in interesting_section()
2101 struct spu_link_hash_table *htab = spu_hash_table (info); in discover_functions() local
2166 if (s != NULL && interesting_section (s, output_bfd, htab)) in discover_functions()
2208 if (interesting_section (sec, output_bfd, htab)) in discover_functions()
2226 if (interesting_section (sec, output_bfd, htab) in discover_functions()
2253 if (interesting_section (sec, output_bfd, htab)) in discover_functions()
2279 if (interesting_section (sec, output_bfd, htab)) in discover_functions()
2374 struct spu_link_hash_table *htab = spu_hash_table (info); in build_call_tree() local
2387 if (!interesting_section (sec, output_bfd, htab) in build_call_tree()
2534 struct spu_link_hash_table *htab = spu_hash_table (info); in sum_stack() local
2545 h = elf_link_hash_lookup (&htab->elf, name, TRUE, TRUE, FALSE); in sum_stack()
2634 struct spu_link_hash_table *htab = spu_hash_table (info); in spu_elf_final_link() local
2636 if (htab->stack_analysis in spu_elf_final_link()
2637 && !spu_elf_stack_analysis (output_bfd, info, htab->emit_stack_syms)) in spu_elf_final_link()
2678 struct spu_link_hash_table *htab; in spu_elf_relocate_section() local
2682 htab = spu_hash_table (info); in spu_elf_relocate_section()
2765 if (needs_ovl_stub (sym_name, sec, input_section, htab, branch)) in spu_elf_relocate_section()
2775 bfd_hash_lookup (&htab->stub_hash_table, stub_name, FALSE, FALSE); in spu_elf_relocate_section()
2778 relocation = (htab->stub->output_section->vma in spu_elf_relocate_section()
2779 + htab->stub->output_offset in spu_elf_relocate_section()
2875 struct spu_link_hash_table *htab = spu_hash_table (info); in spu_elf_output_symbol_hook() local
2878 && htab->num_overlays != 0 in spu_elf_output_symbol_hook()
2892 bfd_hash_lookup (&htab->stub_hash_table, stub_name, FALSE, FALSE); in spu_elf_output_symbol_hook()
2897 = _bfd_elf_section_from_bfd_section (htab->stub->output_section->owner, in spu_elf_output_symbol_hook()
2898 htab->stub->output_section); in spu_elf_output_symbol_hook()
2899 sym->st_value = (htab->stub->output_section->vma in spu_elf_output_symbol_hook()
2900 + htab->stub->output_offset in spu_elf_output_symbol_hook()
2935 struct spu_link_hash_table *htab = spu_hash_table (info); in spu_elf_additional_program_headers() local
2936 int extra = htab->num_overlays; in spu_elf_additional_program_headers()
3047 struct spu_link_hash_table *htab; in spu_elf_modify_program_headers() local
3058 htab = spu_hash_table (info); in spu_elf_modify_program_headers()
3059 if (htab->num_overlays != 0) in spu_elf_modify_program_headers()
3071 if (htab->ovtab != NULL && htab->ovtab->size != 0) in spu_elf_modify_program_headers()
3073 bfd_byte *p = htab->ovtab->contents; in spu_elf_modify_program_headers()
3077 bfd_put_32 (htab->ovtab->owner, phdr[i].p_offset, p + off); in spu_elf_modify_program_headers()