Home | History | Annotate | Download | only in src

Lines Matching full:shdr

379     GElf_Shdr shdr;
383 Elf32_Word old_sh_link; /* Original value of shdr.sh_link. */
561 if (gelf_getshdr (scn, &shdr_info[cnt].shdr) == NULL)
566 shdr_info[cnt].shdr.sh_name);
576 /* Remember the shdr.sh_link value. */
577 shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link;
583 || (shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) == 0)
584 shdr_info[cnt].shdr.sh_offset = 0;
588 if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX))
590 assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
591 shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt;
593 else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP))
618 else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym))
620 assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
621 shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt;
626 if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0)
634 shdr_info[cnt].shdr.sh_flags &= ~SHF_GROUP;
654 if (SECTION_STRIP_P (ebl, elf, ehdr, &shdr_info[cnt].shdr,
704 if ((shdr_info[cnt].shdr.sh_type == SHT_REL
705 || shdr_info[cnt].shdr.sh_type == SHT_RELA)
706 && shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
715 if (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM
716 || shdr_info[cnt].shdr.sh_type == SHT_SYMTAB)
737 assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
801 if (shdr_info[shdr_info[cnt].shdr.sh_link].idx == 0)
803 shdr_info[shdr_info[cnt].shdr.sh_link].idx = 1;
804 changes |= shdr_info[cnt].shdr.sh_link < cnt;
808 if (SH_INFO_LINK_P (&shdr_info[cnt].shdr)
809 && shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
811 shdr_info[shdr_info[cnt].shdr.sh_info].idx = 1;
812 changes |= shdr_info[cnt].shdr.sh_info < cnt;
841 debugshdr = shdr_info[cnt].shdr;
969 shdr_info[cnt].shdr.sh_type = SHT_PROGBITS;
970 shdr_info[cnt].shdr.sh_flags = 0;
971 shdr_info[cnt].shdr.sh_addr = 0;
972 shdr_info[cnt].shdr.sh_link = SHN_UNDEF;
973 shdr_info[cnt].shdr.sh_info = SHN_UNDEF;
974 shdr_info[cnt].shdr.sh_entsize = 0;
975 shdr_info[cnt].shdr.sh_addralign = 4;
979 shdr_info[cnt].shdr.sh_offset = 0;
1000 shdr_info[cnt].shdr.sh_size = shdr_info[cnt].data->d_size
1026 shdr_info[cnt].shdr.sh_type = SHT_STRTAB;
1027 shdr_info[cnt].shdr.sh_flags = 0;
1028 shdr_info[cnt].shdr.sh_addr = 0;
1029 shdr_info[cnt].shdr.sh_link = SHN_UNDEF;
1030 shdr_info[cnt].shdr.sh_info = SHN_UNDEF;
1031 shdr_info[cnt].shdr.sh_entsize = 0;
1035 shdr_info[cnt].shdr.sh_offset = 0;
1036 shdr_info[cnt].shdr.sh_addralign = 1;
1056 shdr_info[cnt].shdr.sh_size = shstrtab_data->d_size;
1069 shdr_info[cnt].shdr.sh_name = ebl_strtaboffset (shdr_info[cnt].se);
1073 if (shdr_info[cnt].shdr.sh_link != 0)
1074 shdr_info[cnt].shdr.sh_link =
1075 shdr_info[shdr_info[cnt].shdr.sh_link].idx;
1077 if (shdr_info[cnt].shdr.sh_type == SHT_GROUP)
1089 if (SH_INFO_LINK_P (&shdr_info[cnt].shdr))
1090 shdr_info[cnt].shdr.sh_info =
1091 shdr_info[shdr_info[cnt].shdr.sh_info].idx;
1113 shdr_info[cnt].shdr.sh_size = shdr_info[cnt].data->d_size;
1117 if (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM
1118 || shdr_info[cnt].shdr.sh_type == SHT_SYMTAB)
1128 assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX);
1140 assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
1190 shdr_info[cnt].shdr.sh_info = destidx - 1;
1240 shdr_info[cnt].shdr.sh_info = destidx - 1;
1252 shdr_info[cnt].shdr.sh_size = newdata->d_size
1266 if (shdr_info[cnt].shdr.sh_offset == 0)
1267 shdr_info[cnt].shdr.sh_offset
1268 = ((lastoffset + shdr_info[cnt].shdr.sh_addralign - 1)
1269 & ~((GElf_Off) (shdr_info[cnt].shdr.sh_addralign - 1)));
1272 if (unlikely (gelf_update_shdr (scn, &shdr_info[cnt].shdr) == 0))
1277 GElf_Off filesz = (shdr_info[cnt].shdr.sh_type != SHT_NOBITS
1278 ? shdr_info[cnt].shdr.sh_size : 0);
1279 if (lastoffset < shdr_info[cnt].shdr.sh_offset + filesz)
1280 lastoffset = shdr_info[cnt].shdr.sh_offset + filesz;
1294 if (shdr_info[cnt].shdr.sh_type == SHT_REL
1295 || shdr_info[cnt].shdr.sh_type == SHT_RELA)
1307 size_t nrels = (shdr_info[cnt].shdr.sh_size
1308 / shdr_info[cnt].shdr.sh_entsize);
1310 if (shdr_info[cnt].shdr.sh_type == SHT_REL)
1347 else if (shdr_info[cnt].shdr.sh_type == SHT_HASH)
1370 if (shdr_info[cnt].shdr.sh_entsize == sizeof (Elf32_Word))
1394 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
1395 shdr->sh_size = hashd->d_size
1398 (void) gelf_update_shdr (scn, shdr);
1405 for (size_t inner = shdr_info[symtabidx].shdr.sh_info;
1433 assert (shdr_info[cnt].shdr.sh_entsize
1457 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
1458 shdr->sh_size = hashd->d_size
1461 (void) gelf_update_shdr (scn, shdr);
1468 for (size_t inner = shdr_info[symtabidx].shdr.sh_info;
1500 else if (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym)
1548 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
1549 shdr->sh_size = verd->d_size
1554 (void) gelf_update_shdr (scn, shdr);
1562 else if (shdr_info[cnt].shdr.sh_type == SHT_GROUP)
1571 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
1572 assert (shdr != NULL);
1575 shdr->sh_info = shdr_info[stabidx].newsymidx[shdr->sh_info];
1577 (void) gelf_update_shdr (scn, shdr);
1598 newehdr->e_shoff = ((shdr_info[shdridx].shdr.sh_offset
1599 + shdr_info[shdridx].shdr.sh_size + offsize - 1)
1611 if (gelf_getshdr (shdr_info[0].scn, &shdr_info[0].shdr) == NULL)
1614 shdr_info[0].shdr.sh_link = idx;
1615 (void) gelf_update_shdr (shdr_info[0].scn, &shdr_info[0].shdr);