Lines Matching refs:secinfo
53 struct sec_merge_sec_info *secinfo; member
126 ret->secinfo = NULL; in sec_merge_hash_newfunc()
264 unsigned int alignment, struct sec_merge_sec_info *secinfo) in sec_merge_add() argument
272 if (entry->secinfo == NULL) in sec_merge_add()
275 entry->secinfo = secinfo; in sec_merge_add()
290 struct sec_merge_sec_info *secinfo = entry->secinfo; in sec_merge_emit() local
291 asection *sec = secinfo->sec; in sec_merge_emit()
303 for (; entry != NULL && entry->secinfo == secinfo; entry = entry->next) in sec_merge_emit()
363 struct sec_merge_sec_info *secinfo; in _bfd_add_merge_section() local
400 if ((secinfo = sinfo->chain) in _bfd_add_merge_section()
401 && ! ((secinfo->sec->flags ^ sec->flags) & (SEC_MERGE | SEC_STRINGS)) in _bfd_add_merge_section()
402 && secinfo->sec->entsize == sec->entsize in _bfd_add_merge_section()
403 && secinfo->sec->alignment_power == sec->alignment_power in _bfd_add_merge_section()
404 && secinfo->sec->output_section == sec->output_section) in _bfd_add_merge_section()
434 secinfo = (struct sec_merge_sec_info *) *psecinfo; in _bfd_add_merge_section()
437 secinfo->next = sinfo->chain->next; in _bfd_add_merge_section()
438 sinfo->chain->next = secinfo; in _bfd_add_merge_section()
441 secinfo->next = secinfo; in _bfd_add_merge_section()
442 sinfo->chain = secinfo; in _bfd_add_merge_section()
443 secinfo->sec = sec; in _bfd_add_merge_section()
444 secinfo->psecinfo = psecinfo; in _bfd_add_merge_section()
445 secinfo->htab = sinfo->htab; in _bfd_add_merge_section()
446 secinfo->first_str = NULL; in _bfd_add_merge_section()
450 memset (secinfo->contents + sec->size, 0, sec->entsize); in _bfd_add_merge_section()
451 contents = secinfo->contents; in _bfd_add_merge_section()
465 struct sec_merge_sec_info *secinfo) in record_section() argument
467 asection *sec = secinfo->sec; in record_section()
475 end = secinfo->contents + sec->size; in record_section()
480 for (p = secinfo->contents; p < end; ) in record_section()
482 eltalign = p - secinfo->contents; in record_section()
487 secinfo); in record_section()
495 if (!nul && !((p - secinfo->contents) & mask)) in record_section()
499 (unsigned) mask + 1, secinfo); in record_section()
515 if (!nul && !((p - secinfo->contents) & mask)) in record_section()
519 (unsigned) mask + 1, secinfo); in record_section()
530 for (p = secinfo->contents; p < end; p += sec->entsize) in record_section()
532 entry = sec_merge_add (sinfo->htab, (char *) p, 1, secinfo); in record_section()
541 for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) in record_section()
542 *secinfo->psecinfo = NULL; in record_section()
616 struct sec_merge_sec_info *secinfo; in merge_strings() local
675 secinfo = sinfo->htab->first->secinfo; in merge_strings()
678 if (e->secinfo != secinfo) in merge_strings()
680 secinfo->sec->size = size; in merge_strings()
681 secinfo = e->secinfo; in merge_strings()
685 if (e->secinfo->first_str == NULL) in merge_strings()
687 e->secinfo->first_str = e; in merge_strings()
695 secinfo->sec->size = size; in merge_strings()
696 if (secinfo->sec->alignment_power != 0) in merge_strings()
698 bfd_size_type align = (bfd_size_type) 1 << secinfo->sec->alignment_power; in merge_strings()
699 secinfo->sec->size = (secinfo->sec->size + align - 1) & -align; in merge_strings()
712 e->secinfo = e->u.suffix->secinfo; in merge_strings()
732 struct sec_merge_sec_info * secinfo; in _bfd_merge_sections() local
738 secinfo = sinfo->chain; in _bfd_merge_sections()
739 sinfo->chain = secinfo->next; in _bfd_merge_sections()
740 secinfo->next = NULL; in _bfd_merge_sections()
743 for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) in _bfd_merge_sections()
744 if (secinfo->sec->flags & SEC_EXCLUDE) in _bfd_merge_sections()
746 *secinfo->psecinfo = NULL; in _bfd_merge_sections()
748 (*remove_hook) (abfd, secinfo->sec); in _bfd_merge_sections()
750 else if (! record_section (sinfo, secinfo)) in _bfd_merge_sections()
753 if (secinfo) in _bfd_merge_sections()
768 secinfo = NULL; in _bfd_merge_sections()
771 if (e->secinfo->first_str == NULL) in _bfd_merge_sections()
773 if (secinfo) in _bfd_merge_sections()
774 secinfo->sec->size = size; in _bfd_merge_sections()
775 e->secinfo->first_str = e; in _bfd_merge_sections()
782 secinfo = e->secinfo; in _bfd_merge_sections()
784 secinfo->sec->size = size; in _bfd_merge_sections()
789 for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) in _bfd_merge_sections()
790 if (secinfo->first_str == NULL) in _bfd_merge_sections()
791 secinfo->sec->flags |= SEC_EXCLUDE | SEC_KEEP; in _bfd_merge_sections()
802 struct sec_merge_sec_info *secinfo; in _bfd_write_merged_section() local
807 secinfo = (struct sec_merge_sec_info *) psecinfo; in _bfd_write_merged_section()
809 if (!secinfo) in _bfd_write_merged_section()
812 if (secinfo->first_str == NULL) in _bfd_write_merged_section()
834 if (! sec_merge_emit (output_bfd, secinfo->first_str, contents, in _bfd_write_merged_section()
849 struct sec_merge_sec_info *secinfo; in _bfd_merged_section_offset() local
854 secinfo = (struct sec_merge_sec_info *) psecinfo; in _bfd_merged_section_offset()
856 if (!secinfo) in _bfd_merged_section_offset()
867 return secinfo->first_str ? sec->size : 0; in _bfd_merged_section_offset()
870 if (secinfo->htab->strings) in _bfd_merged_section_offset()
874 p = secinfo->contents + offset - 1; in _bfd_merged_section_offset()
875 while (p >= secinfo->contents && *p) in _bfd_merged_section_offset()
881 p = secinfo->contents + (offset / sec->entsize) * sec->entsize; in _bfd_merged_section_offset()
883 while (p >= secinfo->contents) in _bfd_merged_section_offset()
899 p = secinfo->contents + (offset / sec->entsize) * sec->entsize; in _bfd_merged_section_offset()
901 entry = sec_merge_hash_lookup (secinfo->htab, (char *) p, 0, FALSE); in _bfd_merged_section_offset()
904 if (! secinfo->htab->strings) in _bfd_merged_section_offset()
910 if (! secinfo->htab->first) in _bfd_merged_section_offset()
912 entry = secinfo->htab->first; in _bfd_merged_section_offset()
913 p = (secinfo->contents + (offset / sec->entsize + 1) * sec->entsize in _bfd_merged_section_offset()
917 *psec = entry->secinfo->sec; in _bfd_merged_section_offset()
918 return entry->u.index + (secinfo->contents + offset - p); in _bfd_merged_section_offset()