Lines Matching refs:secinfo
52 struct sec_merge_sec_info *secinfo; member
125 ret->secinfo = NULL; in sec_merge_hash_newfunc()
263 unsigned int alignment, struct sec_merge_sec_info *secinfo) in sec_merge_add() argument
271 if (entry->secinfo == NULL) in sec_merge_add()
274 entry->secinfo = secinfo; in sec_merge_add()
288 struct sec_merge_sec_info *secinfo = entry->secinfo; in sec_merge_emit() local
289 asection *sec = secinfo->sec; in sec_merge_emit()
301 for (; entry != NULL && entry->secinfo == secinfo; entry = entry->next) in sec_merge_emit()
347 struct sec_merge_sec_info *secinfo; in _bfd_add_merge_section() local
384 if ((secinfo = sinfo->chain) in _bfd_add_merge_section()
385 && ! ((secinfo->sec->flags ^ sec->flags) & (SEC_MERGE | SEC_STRINGS)) in _bfd_add_merge_section()
386 && secinfo->sec->entsize == sec->entsize in _bfd_add_merge_section()
387 && secinfo->sec->alignment_power == sec->alignment_power in _bfd_add_merge_section()
388 && secinfo->sec->output_section == sec->output_section) in _bfd_add_merge_section()
418 secinfo = (struct sec_merge_sec_info *) *psecinfo; in _bfd_add_merge_section()
421 secinfo->next = sinfo->chain->next; in _bfd_add_merge_section()
422 sinfo->chain->next = secinfo; in _bfd_add_merge_section()
425 secinfo->next = secinfo; in _bfd_add_merge_section()
426 sinfo->chain = secinfo; in _bfd_add_merge_section()
427 secinfo->sec = sec; in _bfd_add_merge_section()
428 secinfo->psecinfo = psecinfo; in _bfd_add_merge_section()
429 secinfo->htab = sinfo->htab; in _bfd_add_merge_section()
430 secinfo->first_str = NULL; in _bfd_add_merge_section()
434 memset (secinfo->contents + sec->size, 0, sec->entsize); in _bfd_add_merge_section()
435 contents = secinfo->contents; in _bfd_add_merge_section()
449 struct sec_merge_sec_info *secinfo) in record_section() argument
451 asection *sec = secinfo->sec; in record_section()
459 end = secinfo->contents + sec->size; in record_section()
464 for (p = secinfo->contents; p < end; ) in record_section()
466 eltalign = p - secinfo->contents; in record_section()
471 secinfo); in record_section()
479 if (!nul && !((p - secinfo->contents) & mask)) in record_section()
483 (unsigned) mask + 1, secinfo); in record_section()
499 if (!nul && !((p - secinfo->contents) & mask)) in record_section()
503 (unsigned) mask + 1, secinfo); in record_section()
514 for (p = secinfo->contents; p < end; p += sec->entsize) in record_section()
516 entry = sec_merge_add (sinfo->htab, (char *) p, 1, secinfo); in record_section()
525 for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) in record_section()
526 *secinfo->psecinfo = NULL; in record_section()
600 struct sec_merge_sec_info *secinfo; in merge_strings() local
659 secinfo = sinfo->htab->first->secinfo; in merge_strings()
662 if (e->secinfo != secinfo) in merge_strings()
664 secinfo->sec->size = size; in merge_strings()
665 secinfo = e->secinfo; in merge_strings()
669 if (e->secinfo->first_str == NULL) in merge_strings()
671 e->secinfo->first_str = e; in merge_strings()
679 secinfo->sec->size = size; in merge_strings()
680 if (secinfo->sec->alignment_power != 0) in merge_strings()
682 bfd_size_type align = (bfd_size_type) 1 << secinfo->sec->alignment_power; in merge_strings()
683 secinfo->sec->size = (secinfo->sec->size + align - 1) & -align; in merge_strings()
696 e->secinfo = e->u.suffix->secinfo; in merge_strings()
716 struct sec_merge_sec_info * secinfo; in _bfd_merge_sections() local
722 secinfo = sinfo->chain; in _bfd_merge_sections()
723 sinfo->chain = secinfo->next; in _bfd_merge_sections()
724 secinfo->next = NULL; in _bfd_merge_sections()
727 for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) in _bfd_merge_sections()
728 if (secinfo->sec->flags & SEC_EXCLUDE) in _bfd_merge_sections()
730 *secinfo->psecinfo = NULL; in _bfd_merge_sections()
732 (*remove_hook) (abfd, secinfo->sec); in _bfd_merge_sections()
734 else if (! record_section (sinfo, secinfo)) in _bfd_merge_sections()
737 if (secinfo) in _bfd_merge_sections()
752 secinfo = NULL; in _bfd_merge_sections()
755 if (e->secinfo->first_str == NULL) in _bfd_merge_sections()
757 if (secinfo) in _bfd_merge_sections()
758 secinfo->sec->size = size; in _bfd_merge_sections()
759 e->secinfo->first_str = e; in _bfd_merge_sections()
766 secinfo = e->secinfo; in _bfd_merge_sections()
768 secinfo->sec->size = size; in _bfd_merge_sections()
773 for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) in _bfd_merge_sections()
774 if (secinfo->first_str == NULL) in _bfd_merge_sections()
775 secinfo->sec->flags |= SEC_EXCLUDE | SEC_KEEP; in _bfd_merge_sections()
786 struct sec_merge_sec_info *secinfo; in _bfd_write_merged_section() local
789 secinfo = (struct sec_merge_sec_info *) psecinfo; in _bfd_write_merged_section()
791 if (!secinfo) in _bfd_write_merged_section()
794 if (secinfo->first_str == NULL) in _bfd_write_merged_section()
802 if (! sec_merge_emit (output_bfd, secinfo->first_str)) in _bfd_write_merged_section()
816 struct sec_merge_sec_info *secinfo; in _bfd_merged_section_offset() local
821 secinfo = (struct sec_merge_sec_info *) psecinfo; in _bfd_merged_section_offset()
823 if (!secinfo) in _bfd_merged_section_offset()
834 return secinfo->first_str ? sec->size : 0; in _bfd_merged_section_offset()
837 if (secinfo->htab->strings) in _bfd_merged_section_offset()
841 p = secinfo->contents + offset - 1; in _bfd_merged_section_offset()
842 while (p >= secinfo->contents && *p) in _bfd_merged_section_offset()
848 p = secinfo->contents + (offset / sec->entsize) * sec->entsize; in _bfd_merged_section_offset()
850 while (p >= secinfo->contents) in _bfd_merged_section_offset()
866 p = secinfo->contents + (offset / sec->entsize) * sec->entsize; in _bfd_merged_section_offset()
868 entry = sec_merge_hash_lookup (secinfo->htab, (char *) p, 0, FALSE); in _bfd_merged_section_offset()
871 if (! secinfo->htab->strings) in _bfd_merged_section_offset()
877 if (! secinfo->htab->first) in _bfd_merged_section_offset()
879 entry = secinfo->htab->first; in _bfd_merged_section_offset()
880 p = (secinfo->contents + (offset / sec->entsize + 1) * sec->entsize in _bfd_merged_section_offset()
884 *psec = entry->secinfo->sec; in _bfd_merged_section_offset()
885 return entry->u.index + (secinfo->contents + offset - p); in _bfd_merged_section_offset()