• Home
  • Raw
  • Download

Lines Matching refs:sec

1067       const struct section *sec = &sections[i];  in find_alloc_sections_prelink()  local
1068 if (sec->shdr.sh_type == SHT_PROGBITS in find_alloc_sections_prelink()
1069 && !(sec->shdr.sh_flags & SHF_ALLOC) in find_alloc_sections_prelink()
1070 && !strcmp (sec->name, ".gnu.prelink_undo")) in find_alloc_sections_prelink()
1072 undo = sec->scn; in find_alloc_sections_prelink()
1150 struct section *sec = &undo_sections[undo_nalloc]; in find_alloc_sections_prelink() local
1155 #define COPY(field) sec->shdr.field = (*s32)[i].field in find_alloc_sections_prelink()
1169 sec->shdr = (*s64)[i]; in find_alloc_sections_prelink()
1170 if (sec->shdr.sh_flags & SHF_ALLOC) in find_alloc_sections_prelink()
1172 sec->shdr.sh_addr += bias; in find_alloc_sections_prelink()
1173 sec->name = get_section_name (i + 1, &sec->shdr, main_shstrtab); in find_alloc_sections_prelink()
1174 sec->scn = elf_getscn (main, i + 1); /* Really just for ndx. */ in find_alloc_sections_prelink()
1175 sec->outscn = NULL; in find_alloc_sections_prelink()
1176 sec->strent = NULL; in find_alloc_sections_prelink()
1177 sec->sig = get_group_sig (main, &sec->shdr); in find_alloc_sections_prelink()
1212 struct section *sec = find_alloc_section (shdr, 0, name, in find_alloc_sections_prelink() local
1215 if (sec != NULL) in find_alloc_sections_prelink()
1217 sec->outscn = scn; in find_alloc_sections_prelink()
1246 struct section *sec = &sections[j]; in find_alloc_sections_prelink() local
1248 (2 * sec->shdr.field == 3 * undo_sec->shdr.field) in find_alloc_sections_prelink()
1249 if (sec->outscn == NULL in find_alloc_sections_prelink()
1250 && sec->shdr.sh_name == undo_sec->shdr.sh_name in find_alloc_sections_prelink()
1251 && sec->shdr.sh_flags == undo_sec->shdr.sh_flags in find_alloc_sections_prelink()
1252 && sec->shdr.sh_addralign == undo_sec->shdr.sh_addralign in find_alloc_sections_prelink()
1253 && (((sec->shdr.sh_type == undo_sec->shdr.sh_type in find_alloc_sections_prelink()
1254 && sec->shdr.sh_entsize == undo_sec->shdr.sh_entsize in find_alloc_sections_prelink()
1255 && (sec->shdr.sh_size == undo_sec->shdr.sh_size in find_alloc_sections_prelink()
1256 || (sec->shdr.sh_size > undo_sec->shdr.sh_size in find_alloc_sections_prelink()
1258 && !strcmp (sec->name, ".dynstr")))) in find_alloc_sections_prelink()
1259 || (sec->shdr.sh_size == undo_sec->shdr.sh_size in find_alloc_sections_prelink()
1260 && ((sec->shdr.sh_entsize == undo_sec->shdr.sh_entsize in find_alloc_sections_prelink()
1263 && !strcmp (sec->name, ".plt"))) in find_alloc_sections_prelink()
1264 || (sec->shdr.sh_type == SHT_RELA in find_alloc_sections_prelink()
1267 || (sec->shdr.sh_entsize == undo_sec->shdr.sh_entsize in find_alloc_sections_prelink()
1268 && (sec->shdr.sh_type == undo_sec->shdr.sh_type in find_alloc_sections_prelink()
1269 || (sec->shdr.sh_type == SHT_PROGBITS in find_alloc_sections_prelink()
1271 && sec->shdr.sh_size <= undo_sec->shdr.sh_size in find_alloc_sections_prelink()
1272 && (!strcmp (sec->name, ".bss") in find_alloc_sections_prelink()
1273 || !strcmp (sec->name, ".sbss")) in find_alloc_sections_prelink()
1274 && (sec->shdr.sh_size == undo_sec->shdr.sh_size in find_alloc_sections_prelink()
1275 || (split_bss = sec) > sections)))) in find_alloc_sections_prelink()
1277 sec->outscn = undo_sec->outscn; in find_alloc_sections_prelink()
1308 for (struct section *sec = sections; in new_shstrtab() local
1309 sec < &sections[stripped_shnum - 1]; in new_shstrtab()
1310 ++sec) in new_shstrtab()
1311 if (sec->outscn != NULL) in new_shstrtab()
1313 if (sec->strent == NULL) in new_shstrtab()
1315 sec->strent = dwelf_strtab_add (strtab, sec->name); in new_shstrtab()
1316 ELF_CHECK (sec->strent != NULL, in new_shstrtab()
1319 unstripped_strent[elf_ndxscn (sec->outscn) - 1] = sec->strent; in new_shstrtab()
1429 struct section *sec = &sections[i]; in copy_elided_sections() local
1430 int cmp = compare_unalloc_sections (shdr, &sec->shdr, in copy_elided_sections()
1431 name, sec->name, in copy_elided_sections()
1432 sig, sec->sig); in copy_elided_sections()
1438 return sec; in copy_elided_sections()
1473 struct section *sec = NULL; in copy_elided_sections() local
1479 sec = find_alloc_section (shdr, bias, name, sections, nalloc); in copy_elided_sections()
1480 if (sec == NULL) in copy_elided_sections()
1492 sec = &sections[alloc_avail++]; in copy_elided_sections()
1497 sec = &sections[i]; in copy_elided_sections()
1505 sec = find_unalloc_section (shdr, name, in copy_elided_sections()
1507 if (sec == NULL) in copy_elided_sections()
1522 if (sec == NULL) in copy_elided_sections()
1527 sec->outscn = scn; in copy_elided_sections()
1551 for (struct section *sec = sections; in copy_elided_sections() local
1552 sec < &sections[stripped_shnum - 1]; in copy_elided_sections()
1553 ++sec) in copy_elided_sections()
1555 size_t secndx = elf_ndxscn (sec->scn); in copy_elided_sections()
1557 if (sec->outscn == NULL) in copy_elided_sections()
1568 if (unstripped_symtab != NULL && sec == stripped_symtab) in copy_elided_sections()
1584 if (!(sec->shdr.sh_flags & SHF_ALLOC) in copy_elided_sections()
1585 && !strcmp (sec->name, ".gnu_debuglink")) in copy_elided_sections()
1593 sec->outscn = elf_newscn (unstripped); in copy_elided_sections()
1594 Elf_Data *newdata = elf_newdata (sec->outscn); in copy_elided_sections()
1595 ELF_CHECK (newdata != NULL && gelf_update_shdr (sec->outscn, in copy_elided_sections()
1596 &sec->shdr), in copy_elided_sections()
1601 sec->strent = dwelf_strtab_add (strtab, sec->name); in copy_elided_sections()
1602 ELF_CHECK (sec->strent != NULL, in copy_elided_sections()
1607 ndx_section[secndx - 1] = elf_ndxscn (sec->outscn); in copy_elided_sections()
1625 for (const struct section *sec = sections; in copy_elided_sections() local
1626 sec < &sections[stripped_shnum - 1]; in copy_elided_sections()
1627 ++sec) in copy_elided_sections()
1628 if (sec->outscn != NULL) in copy_elided_sections()
1631 GElf_Shdr *shdr = gelf_getshdr (sec->outscn, &shdr_mem); in copy_elided_sections()
1642 shdr_mem.sh_addr = sec->shdr.sh_addr; in copy_elided_sections()
1644 shdr_mem.sh_type = sec->shdr.sh_type; in copy_elided_sections()
1645 shdr_mem.sh_size = sec->shdr.sh_size; in copy_elided_sections()
1646 shdr_mem.sh_info = sec->shdr.sh_info; in copy_elided_sections()
1647 shdr_mem.sh_link = sec->shdr.sh_link; in copy_elided_sections()
1651 if ((sec->shdr.sh_type == SHT_REL || sec->shdr.sh_type == SHT_RELA) in copy_elided_sections()
1652 && sec->shdr.sh_flags != shdr_mem.sh_flags in copy_elided_sections()
1653 && (sec->shdr.sh_flags & SHF_INFO_LINK) != 0) in copy_elided_sections()
1656 if (sec->shdr.sh_link != SHN_UNDEF) in copy_elided_sections()
1657 shdr_mem.sh_link = ndx_section[sec->shdr.sh_link - 1]; in copy_elided_sections()
1658 if (SH_INFO_LINK_P (&sec->shdr) && sec->shdr.sh_info != 0) in copy_elided_sections()
1659 shdr_mem.sh_info = ndx_section[sec->shdr.sh_info - 1]; in copy_elided_sections()
1662 shdr_mem.sh_name = dwelf_strent_off (sec->strent); in copy_elided_sections()
1664 Elf_Data *indata = elf_getdata (sec->scn, NULL); in copy_elided_sections()
1666 Elf_Data *outdata = elf_getdata (sec->outscn, NULL); in copy_elided_sections()
1674 shdr_mem.sh_offset = sec->shdr.sh_offset; in copy_elided_sections()
1675 placed[elf_ndxscn (sec->outscn) - 1] = true; in copy_elided_sections()
1684 update_shdr (sec->outscn, &shdr_mem); in copy_elided_sections()
1728 stripped_symtab = sec; in copy_elided_sections()
1730 stripped_dynsym = sec; in copy_elided_sections()
1871 Elf_Scn *sec = elf_getscn (unstripped, i + 1); in copy_elided_sections() local
1873 GElf_Shdr *hdr = gelf_getshdr (sec, &mem); in copy_elided_sections()
1898 Elf_Scn *sec = elf_getscn (unstripped, i + 1); in copy_elided_sections() local
1900 GElf_Shdr *hdr = gelf_getshdr (sec, &mem); in copy_elided_sections()
1902 update_shdr (sec, hdr); in copy_elided_sections()
1952 for (const struct section *sec = sections; in copy_elided_sections() local
1953 sec < &sections[stripped_shnum - 1]; in copy_elided_sections()
1954 ++sec) in copy_elided_sections()
1955 if (sec->outscn != NULL && sec->shdr.sh_link == old_sh_link) in copy_elided_sections()
1956 adjust_relocs (sec->outscn, sec->scn, &sec->shdr, in copy_elided_sections()