Lines Matching refs:hdr_info
459 bfd_elf_discard_eh_frame_entry (struct eh_frame_hdr_info *hdr_info) in bfd_elf_discard_eh_frame_entry() argument
462 for (i = 0; i < hdr_info->array_count; i++) in bfd_elf_discard_eh_frame_entry()
464 if (hdr_info->u.compact.entries[i]->flags & SEC_EXCLUDE) in bfd_elf_discard_eh_frame_entry()
467 for (j = i + 1; j < hdr_info->array_count; j++) in bfd_elf_discard_eh_frame_entry()
468 hdr_info->u.compact.entries[j-1] = hdr_info->u.compact.entries[j]; in bfd_elf_discard_eh_frame_entry()
470 hdr_info->array_count--; in bfd_elf_discard_eh_frame_entry()
471 hdr_info->u.compact.entries[hdr_info->array_count] = NULL; in bfd_elf_discard_eh_frame_entry()
480 bfd_elf_record_eh_frame_entry (struct eh_frame_hdr_info *hdr_info, in bfd_elf_record_eh_frame_entry() argument
483 if (hdr_info->array_count == hdr_info->u.compact.allocated_entries) in bfd_elf_record_eh_frame_entry()
485 if (hdr_info->u.compact.allocated_entries == 0) in bfd_elf_record_eh_frame_entry()
487 hdr_info->frame_hdr_is_compact = TRUE; in bfd_elf_record_eh_frame_entry()
488 hdr_info->u.compact.allocated_entries = 2; in bfd_elf_record_eh_frame_entry()
489 hdr_info->u.compact.entries = in bfd_elf_record_eh_frame_entry()
490 bfd_malloc (hdr_info->u.compact.allocated_entries in bfd_elf_record_eh_frame_entry()
491 * sizeof (hdr_info->u.compact.entries[0])); in bfd_elf_record_eh_frame_entry()
495 hdr_info->u.compact.allocated_entries *= 2; in bfd_elf_record_eh_frame_entry()
496 hdr_info->u.compact.entries = in bfd_elf_record_eh_frame_entry()
497 bfd_realloc (hdr_info->u.compact.entries, in bfd_elf_record_eh_frame_entry()
498 hdr_info->u.compact.allocated_entries in bfd_elf_record_eh_frame_entry()
499 * sizeof (hdr_info->u.compact.entries[0])); in bfd_elf_record_eh_frame_entry()
502 BFD_ASSERT (hdr_info->u.compact.entries); in bfd_elf_record_eh_frame_entry()
505 hdr_info->u.compact.entries[hdr_info->array_count++] = sec; in bfd_elf_record_eh_frame_entry()
516 struct eh_frame_hdr_info *hdr_info; in _bfd_elf_parse_eh_frame_entry() local
521 hdr_info = &htab->eh_info; in _bfd_elf_parse_eh_frame_entry()
556 bfd_elf_record_eh_frame_entry (hdr_info, sec); in _bfd_elf_parse_eh_frame_entry()
581 struct eh_frame_hdr_info *hdr_info; in _bfd_elf_parse_eh_frame() local
589 hdr_info = &htab->eh_info; in _bfd_elf_parse_eh_frame()
1033 hdr_info->u.dwarf.table = FALSE; in _bfd_elf_parse_eh_frame()
1102 struct eh_frame_hdr_info *hdr_info; in _bfd_elf_end_eh_frame_parsing() local
1105 hdr_info = &elf_hash_table (info)->eh_info; in _bfd_elf_end_eh_frame_parsing()
1108 || hdr_info->array_count == 0) in _bfd_elf_end_eh_frame_parsing()
1111 bfd_elf_discard_eh_frame_entry (hdr_info); in _bfd_elf_end_eh_frame_parsing()
1113 qsort (hdr_info->u.compact.entries, hdr_info->array_count, in _bfd_elf_end_eh_frame_parsing()
1116 for (i = 0; i < hdr_info->array_count - 1; i++) in _bfd_elf_end_eh_frame_parsing()
1118 add_eh_frame_hdr_terminator (hdr_info->u.compact.entries[i], in _bfd_elf_end_eh_frame_parsing()
1119 hdr_info->u.compact.entries[i + 1]); in _bfd_elf_end_eh_frame_parsing()
1123 add_eh_frame_hdr_terminator (hdr_info->u.compact.entries[i], NULL); in _bfd_elf_end_eh_frame_parsing()
1185 struct eh_frame_hdr_info *hdr_info, in find_merged_cie() argument
1279 if (hdr_info->u.dwarf.cies == NULL) in find_merged_cie()
1281 hdr_info->u.dwarf.cies = htab_try_create (1, cie_hash, cie_eq, free); in find_merged_cie()
1282 if (hdr_info->u.dwarf.cies == NULL) in find_merged_cie()
1285 loc = htab_find_slot_with_hash (hdr_info->u.dwarf.cies, cie, in find_merged_cie()
1326 struct eh_frame_hdr_info *hdr_info; in _bfd_elf_discard_section_eh_frame() local
1339 hdr_info = &elf_hash_table (info)->eh_info; in _bfd_elf_discard_section_eh_frame()
1378 hdr_info->u.dwarf.table = FALSE; in _bfd_elf_discard_section_eh_frame()
1394 hdr_info->u.dwarf.fde_count++; in _bfd_elf_discard_section_eh_frame()
1395 ent->u.fde.cie_inf = find_merged_cie (abfd, info, sec, hdr_info, in _bfd_elf_discard_section_eh_frame()
1427 struct eh_frame_hdr_info *hdr_info; in _bfd_elf_discard_section_eh_frame_hdr() local
1431 hdr_info = &htab->eh_info; in _bfd_elf_discard_section_eh_frame_hdr()
1433 if (!hdr_info->frame_hdr_is_compact && hdr_info->u.dwarf.cies != NULL) in _bfd_elf_discard_section_eh_frame_hdr()
1435 htab_delete (hdr_info->u.dwarf.cies); in _bfd_elf_discard_section_eh_frame_hdr()
1436 hdr_info->u.dwarf.cies = NULL; in _bfd_elf_discard_section_eh_frame_hdr()
1439 sec = hdr_info->hdr_sec; in _bfd_elf_discard_section_eh_frame_hdr()
1452 if (hdr_info->u.dwarf.table) in _bfd_elf_discard_section_eh_frame_hdr()
1453 sec->size += 4 + hdr_info->u.dwarf.fde_count * 8; in _bfd_elf_discard_section_eh_frame_hdr()
1513 struct eh_frame_hdr_info *hdr_info; in _bfd_elf_maybe_strip_eh_frame_hdr() local
1518 hdr_info = &htab->eh_info; in _bfd_elf_maybe_strip_eh_frame_hdr()
1519 if (hdr_info->hdr_sec == NULL) in _bfd_elf_maybe_strip_eh_frame_hdr()
1522 if (bfd_is_abs_section (hdr_info->hdr_sec->output_section) in _bfd_elf_maybe_strip_eh_frame_hdr()
1529 hdr_info->hdr_sec->flags |= SEC_EXCLUDE; in _bfd_elf_maybe_strip_eh_frame_hdr()
1530 hdr_info->hdr_sec = NULL; in _bfd_elf_maybe_strip_eh_frame_hdr()
1538 hdr_info->hdr_sec, 0, NULL, FALSE, FALSE, &bh))) in _bfd_elf_maybe_strip_eh_frame_hdr()
1547 if (!hdr_info->frame_hdr_is_compact) in _bfd_elf_maybe_strip_eh_frame_hdr()
1548 hdr_info->u.dwarf.table = TRUE; in _bfd_elf_maybe_strip_eh_frame_hdr()
1727 struct eh_frame_hdr_info *hdr_info; in _bfd_elf_write_section_eh_frame() local
1743 hdr_info = &htab->eh_info; in _bfd_elf_write_section_eh_frame()
1745 if (hdr_info->u.dwarf.table && hdr_info->u.dwarf.array == NULL) in _bfd_elf_write_section_eh_frame()
1747 hdr_info->frame_hdr_is_compact = FALSE; in _bfd_elf_write_section_eh_frame()
1748 hdr_info->u.dwarf.array = (struct eh_frame_array_ent *) in _bfd_elf_write_section_eh_frame()
1749 bfd_malloc (hdr_info->u.dwarf.fde_count in _bfd_elf_write_section_eh_frame()
1750 * sizeof (*hdr_info->u.dwarf.array)); in _bfd_elf_write_section_eh_frame()
1752 if (hdr_info->u.dwarf.array == NULL) in _bfd_elf_write_section_eh_frame()
1753 hdr_info = NULL; in _bfd_elf_write_section_eh_frame()
1933 BFD_ASSERT (hdr_info == NULL); in _bfd_elf_write_section_eh_frame()
1980 if (hdr_info) in _bfd_elf_write_section_eh_frame()
1987 hdr_info->u.dwarf.array[hdr_info->array_count].initial_loc in _bfd_elf_write_section_eh_frame()
1989 hdr_info->u.dwarf.array[hdr_info->array_count].range in _bfd_elf_write_section_eh_frame()
1991 hdr_info->u.dwarf.array[hdr_info->array_count++].fde in _bfd_elf_write_section_eh_frame()
2106 struct eh_frame_hdr_info *hdr_info; in _bfd_elf_fixup_eh_frame_hdr() local
2111 hdr_info = &elf_hash_table (info)->eh_info; in _bfd_elf_fixup_eh_frame_hdr()
2113 if (hdr_info->hdr_sec == NULL in _bfd_elf_fixup_eh_frame_hdr()
2115 || hdr_info->array_count == 0) in _bfd_elf_fixup_eh_frame_hdr()
2120 osec = hdr_info->u.compact.entries[0]->output_section; in _bfd_elf_fixup_eh_frame_hdr()
2121 for (i = 0; i < hdr_info->array_count; i++) in _bfd_elf_fixup_eh_frame_hdr()
2123 sec = hdr_info->u.compact.entries[i]; in _bfd_elf_fixup_eh_frame_hdr()
2167 struct eh_frame_hdr_info *hdr_info; in write_compact_eh_frame_hdr() local
2175 hdr_info = &htab->eh_info; in write_compact_eh_frame_hdr()
2176 sec = hdr_info->hdr_sec; in write_compact_eh_frame_hdr()
2220 struct eh_frame_hdr_info *hdr_info; in write_dwarf_eh_frame_hdr() local
2225 hdr_info = &htab->eh_info; in write_dwarf_eh_frame_hdr()
2226 sec = hdr_info->hdr_sec; in write_dwarf_eh_frame_hdr()
2233 if (hdr_info->u.dwarf.array in write_dwarf_eh_frame_hdr()
2234 && hdr_info->array_count == hdr_info->u.dwarf.fde_count) in write_dwarf_eh_frame_hdr()
2235 size += 4 + hdr_info->u.dwarf.fde_count * 8; in write_dwarf_eh_frame_hdr()
2254 if (hdr_info->u.dwarf.array in write_dwarf_eh_frame_hdr()
2255 && hdr_info->array_count == hdr_info->u.dwarf.fde_count) in write_dwarf_eh_frame_hdr()
2274 bfd_put_32 (abfd, hdr_info->u.dwarf.fde_count, in write_dwarf_eh_frame_hdr()
2276 qsort (hdr_info->u.dwarf.array, hdr_info->u.dwarf.fde_count, in write_dwarf_eh_frame_hdr()
2277 sizeof (*hdr_info->u.dwarf.array), vma_compare); in write_dwarf_eh_frame_hdr()
2280 for (i = 0; i < hdr_info->u.dwarf.fde_count; i++) in write_dwarf_eh_frame_hdr()
2284 val = hdr_info->u.dwarf.array[i].initial_loc in write_dwarf_eh_frame_hdr()
2288 && (hdr_info->u.dwarf.array[i].initial_loc in write_dwarf_eh_frame_hdr()
2292 val = hdr_info->u.dwarf.array[i].fde - sec->output_section->vma; in write_dwarf_eh_frame_hdr()
2295 && (hdr_info->u.dwarf.array[i].fde in write_dwarf_eh_frame_hdr()
2300 && (hdr_info->u.dwarf.array[i].initial_loc in write_dwarf_eh_frame_hdr()
2301 < (hdr_info->u.dwarf.array[i - 1].initial_loc in write_dwarf_eh_frame_hdr()
2302 + hdr_info->u.dwarf.array[i - 1].range))) in write_dwarf_eh_frame_hdr()
2324 if (hdr_info->u.dwarf.array != NULL) in write_dwarf_eh_frame_hdr()
2325 free (hdr_info->u.dwarf.array); in write_dwarf_eh_frame_hdr()
2337 struct eh_frame_hdr_info *hdr_info; in _bfd_elf_write_section_eh_frame_hdr() local
2341 hdr_info = &htab->eh_info; in _bfd_elf_write_section_eh_frame_hdr()
2342 sec = hdr_info->hdr_sec; in _bfd_elf_write_section_eh_frame_hdr()