/external/google-breakpad/src/common/linux/ |
D | synth_elf_unittest.cc | 240 const Shdr* shdr = in TYPED_TEST() local 242 EXPECT_EQ(0U, shdr[0].sh_name); in TYPED_TEST() 243 EXPECT_EQ(static_cast<unsigned int>(SHT_NULL), shdr[0].sh_type); in TYPED_TEST() 244 EXPECT_EQ(0U, shdr[0].sh_flags); in TYPED_TEST() 245 EXPECT_EQ(0U, shdr[0].sh_addr); in TYPED_TEST() 246 EXPECT_EQ(0U, shdr[0].sh_offset); in TYPED_TEST() 247 EXPECT_EQ(0U, shdr[0].sh_size); in TYPED_TEST() 248 EXPECT_EQ(0U, shdr[0].sh_link); in TYPED_TEST() 249 EXPECT_EQ(0U, shdr[0].sh_info); in TYPED_TEST() 250 EXPECT_EQ(0U, shdr[0].sh_addralign); in TYPED_TEST() [all …]
|
/external/elfutils/tests/ |
D | update4.c | 43 Elf32_Shdr *shdr; in main() local 122 shdr = elf32_getshdr (scn); in main() 123 if (shdr == NULL) in main() 131 shdr->sh_type = SHT_PROGBITS; in main() 132 shdr->sh_flags = SHF_ALLOC | SHF_EXECINSTR; in main() 133 shdr->sh_addr = 0; in main() 134 shdr->sh_link = 0; in main() 135 shdr->sh_info = 0; in main() 136 shdr->sh_entsize = 1; in main() 158 shdr = elf32_getshdr (scn); in main() [all …]
|
D | asm-tst1.c | 158 GElf_Shdr *shdr; in main() local 168 shdr = gelf_getshdr (scn, &shdr_mem); in main() 169 if (shdr == NULL) in main() 177 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), in main() 181 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), in main() 186 if (shdr->sh_type != (cnt == 3 ? SHT_STRTAB : SHT_PROGBITS)) in main() 192 if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_EXECINSTR)) in main() 193 || (cnt == 2 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE)) in main() 194 || (cnt == 3 && shdr->sh_flags != 0)) in main() 200 if (shdr->sh_addr != 0) in main() [all …]
|
D | asm-tst2.c | 174 GElf_Shdr *shdr; in main() local 184 shdr = gelf_getshdr (scn, &shdr_mem); in main() 185 if (shdr == NULL) in main() 193 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), in main() 197 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), in main() 202 if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS)) in main() 208 if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE)) in main() 209 || (cnt == 2 && shdr->sh_flags != 0)) in main() 215 if (shdr->sh_addr != 0) in main() 221 if ((cnt == 1 && shdr->sh_offset != ((sizeof (Elf32_Ehdr) + 15) & ~15)) in main() [all …]
|
D | asm-tst9.c | 208 GElf_Shdr *shdr; in main() local 218 shdr = gelf_getshdr (escn, &shdr_mem); in main() 219 if (shdr == NULL) in main() 227 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), in main() 231 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), in main() 236 if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS)) in main() 242 if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE)) in main() 243 || (cnt == 2 && shdr->sh_flags != 0)) in main() 249 if (shdr->sh_addr != 0) in main() 255 if ((cnt == 1 && shdr->sh_offset != ((sizeof (Elf32_Ehdr) + 15) & ~15)) in main() [all …]
|
D | sectiondump.c | 82 GElf_Shdr *shdr; in handle_section() local 88 shdr = gelf_getshdr (scn, &shdr_mem); in handle_section() 89 if (ehdr == NULL || shdr == NULL) in handle_section() 103 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), in handle_section() 104 shdr->sh_type, in handle_section() 105 shdr->sh_flags, in handle_section() 106 shdr->sh_addr, in handle_section() 107 shdr->sh_offset, in handle_section() 108 shdr->sh_size, in handle_section() 109 shdr->sh_link, in handle_section() [all …]
|
D | alldts.c | 130 Elf32_Shdr *shdr = elf32_getshdr (scn); in main() local 131 if (shdr == NULL) in main() 141 const Elf32_Off *const dynscn_offset = &shdr->sh_offset; in main() 142 shdr->sh_type = SHT_DYNAMIC; in main() 143 shdr->sh_flags = SHF_ALLOC | SHF_WRITE; in main() 144 shdr->sh_link = SHN_UNDEF; in main() 145 shdr->sh_info = SHN_UNDEF; in main() 147 shdr->sh_addr = 0x1a0; in main() 187 shdr = elf32_getshdr (scn); in main() 188 if (shdr == NULL) in main() [all …]
|
/external/v4l2_codec2/vda/ |
D | h264_parser.cc | 1043 H264SliceHeader* shdr) { in ParseRefPicListModifications() argument 1046 if (!shdr->IsISlice() && !shdr->IsSISlice()) { in ParseRefPicListModifications() 1047 READ_BOOL_OR_RETURN(&shdr->ref_pic_list_modification_flag_l0); in ParseRefPicListModifications() 1048 if (shdr->ref_pic_list_modification_flag_l0) { in ParseRefPicListModifications() 1049 res = ParseRefPicListModification(shdr->num_ref_idx_l0_active_minus1, in ParseRefPicListModifications() 1050 shdr->ref_list_l0_modifications); in ParseRefPicListModifications() 1056 if (shdr->IsBSlice()) { in ParseRefPicListModifications() 1057 READ_BOOL_OR_RETURN(&shdr->ref_pic_list_modification_flag_l1); in ParseRefPicListModifications() 1058 if (shdr->ref_pic_list_modification_flag_l1) { in ParseRefPicListModifications() 1059 res = ParseRefPicListModification(shdr->num_ref_idx_l1_active_minus1, in ParseRefPicListModifications() [all …]
|
/external/elfutils/libelf/ |
D | elf32_getshdr.c | 58 result = scn->shdr.ELFW(e,LIBELFBITS); in ElfW2() 70 ElfW2(LIBELFBITS,Shdr) *shdr = elf->state.ELFW(elf,LIBELFBITS).shdr = in ElfW2() 72 if (elf->state.ELFW(elf,LIBELFBITS).shdr == NULL) in ElfW2() 113 memcpy (shdr, file_shdr, size); in ElfW2() 140 CONVERT_TO (shdr[cnt].sh_name, notcvt[cnt].sh_name); in ElfW2() 141 CONVERT_TO (shdr[cnt].sh_type, notcvt[cnt].sh_type); in ElfW2() 142 CONVERT_TO (shdr[cnt].sh_flags, notcvt[cnt].sh_flags); in ElfW2() 143 CONVERT_TO (shdr[cnt].sh_addr, notcvt[cnt].sh_addr); in ElfW2() 144 CONVERT_TO (shdr[cnt].sh_offset, notcvt[cnt].sh_offset); in ElfW2() 145 CONVERT_TO (shdr[cnt].sh_size, notcvt[cnt].sh_size); in ElfW2() [all …]
|
D | elf_compress_gnu.c | 64 Elf32_Shdr *shdr = elf32_getshdr (scn); in elf_compress_gnu() local 65 if (shdr == NULL) in elf_compress_gnu() 68 sh_flags = shdr->sh_flags; in elf_compress_gnu() 69 sh_type = shdr->sh_type; in elf_compress_gnu() 70 sh_addralign = shdr->sh_addralign; in elf_compress_gnu() 74 Elf64_Shdr *shdr = elf64_getshdr (scn); in elf_compress_gnu() local 75 if (shdr == NULL) in elf_compress_gnu() 78 sh_flags = shdr->sh_flags; in elf_compress_gnu() 79 sh_type = shdr->sh_type; in elf_compress_gnu() 80 sh_addralign = shdr->sh_addralign; in elf_compress_gnu() [all …]
|
D | elf_compress.c | 349 Elf32_Shdr *shdr = elf32_getshdr (scn); in elf_compress() local 350 if (shdr == NULL) in elf_compress() 353 sh_flags = shdr->sh_flags; in elf_compress() 354 sh_type = shdr->sh_type; in elf_compress() 355 sh_addralign = shdr->sh_addralign; in elf_compress() 359 Elf64_Shdr *shdr = elf64_getshdr (scn); in elf_compress() local 360 if (shdr == NULL) in elf_compress() 363 sh_flags = shdr->sh_flags; in elf_compress() 364 sh_type = shdr->sh_type; in elf_compress() 365 sh_addralign = shdr->sh_addralign; in elf_compress() [all …]
|
D | elf32_updatenull.c | 194 update_if_changed (scn0->shdr.ELFW(e,LIBELFBITS)->sh_size, in __elfw2() 203 if (list->data[1].shdr.ELFW(e,LIBELFBITS) == NULL) in __elfw2() 211 ElfW2(LIBELFBITS,Shdr) *shdr = scn->shdr.ELFW(e,LIBELFBITS); in __elfw2() 214 assert (shdr != NULL); in __elfw2() 215 ElfW2(LIBELFBITS,Word) sh_entsize = shdr->sh_entsize; in __elfw2() 216 ElfW2(LIBELFBITS,Word) sh_align = shdr->sh_addralign ?: 1; in __elfw2() 224 switch (shdr->sh_type) in __elfw2() 267 update_if_changed (shdr->sh_entsize, sh_entsize, in __elfw2() 309 > shdr->sh_size)) in __elfw2() 338 (shdr->sh_type != SHT_NOBITS in __elfw2() [all …]
|
D | gelf_getshdr.c | 59 Elf32_Shdr *shdr in gelf_getshdr() local 60 = scn->shdr.e32 ?: __elf32_getshdr_rdlock (scn); in gelf_getshdr() 62 if (shdr == NULL) in gelf_getshdr() 69 dst->name = shdr->name in gelf_getshdr() 85 Elf64_Shdr *shdr in gelf_getshdr() local 86 = scn->shdr.e64 ?: __elf64_getshdr_rdlock (scn); in gelf_getshdr() 88 if (shdr == NULL) in gelf_getshdr() 95 result = memcpy (dst, shdr, sizeof (GElf_Shdr)); in gelf_getshdr()
|
/external/elfutils/src/ |
D | unstrip.c | 355 section_can_shrink (const GElf_Shdr *shdr) in section_can_shrink() argument 357 switch (shdr->sh_type) in section_can_shrink() 386 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (elf, i), &shdr_mem); in symtab_count_leading_section_symbols() local 387 ELF_CHECK (shdr != NULL, _("cannot get section header: %s")); in symtab_count_leading_section_symbols() 395 sym->st_value = shdr->sh_addr; in symtab_count_leading_section_symbols() 427 adjust_relocs (Elf_Scn *outscn, Elf_Scn *inscn, const GElf_Shdr *shdr, in adjust_relocs() argument 439 switch (shdr->sh_type) in adjust_relocs() 442 for (size_t i = 0; i < shdr->sh_size / shdr->sh_entsize; ++i) in adjust_relocs() 453 for (size_t i = 0; i < shdr->sh_size / shdr->sh_entsize; ++i) in adjust_relocs() 480 const size_t onent = shdr->sh_size / shdr->sh_entsize; in adjust_relocs() [all …]
|
D | elflint.c | 97 GElf_Shdr *shdr, int idx); 317 GElf_Shdr *shdr; in section_name() local 323 shdr = gelf_getshdr (elf_getscn (ebl->elf, idx), &shdr_mem); in section_name() 324 if (shdr == NULL) in section_name() 327 ret = elf_strptr (ebl->elf, shstrndx, shdr->sh_name); in section_name() 447 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem); in check_elf_header() local 448 if (shdr != NULL) in check_elf_header() 451 if (shdr->sh_size == 0) in check_elf_header() 455 shnum = shdr->sh_size; in check_elf_header() 464 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem); in check_elf_header() local [all …]
|
D | elfcompress.c | 232 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in compress_section() local 233 if (shdr == NULL) in compress_section() 238 float new = shdr->sh_size; in compress_section() 241 orig_size, shdr->sh_size, (new / orig) * 100); in compress_section() 454 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in process_file() local 455 if (shdr == NULL) in process_file() 461 const char *sname = elf_strptr (elf, shdrstrndx, shdr->sh_name); in process_file() 470 if (shdr->sh_type != SHT_NOBITS in process_file() 471 && (shdr->sh_flags & SHF_ALLOC) == 0) in process_file() 495 (shdr->sh_type == SHT_NOBITS ? "no bits" : "allocated")); in process_file() [all …]
|
D | strip.c | 424 GElf_Shdr shdr; in handle_elf() member 625 if (gelf_getshdr (scn, &shdr_info[cnt].shdr) == NULL) in handle_elf() 630 shdr_info[cnt].shdr.sh_name); in handle_elf() 642 shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link; in handle_elf() 653 || (shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) == 0) in handle_elf() 654 shdr_info[cnt].shdr.sh_offset = 0; in handle_elf() 658 if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX)) in handle_elf() 660 elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0); in handle_elf() 661 shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt; in handle_elf() 663 else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP)) in handle_elf() [all …]
|
D | ldgeneric.c | 529 assert (SCNINFO_SHDR (fileinfo->scninfo[newgrpid].shdr).sh_type in matching_group_comdat_scn() 531 assert (SCNINFO_SHDR (oldp->file->scninfo[oldgrpid].shdr).sh_type in matching_group_comdat_scn() 658 SCNINFO_SHDR (fileinfo->scninfo[shndx].shdr).sh_name); in check_definition() 683 SCNINFO_SHDR (oldfile->scninfo[shndx].shdr).sh_name); in check_definition() 834 SCNINFO_SHDR (fileinfo->scninfo[shndx].shdr).sh_name)); in find_section_group() 872 XElf_Shdr *shdr = &SCNINFO_SHDR (fileinfo->scninfo[idx].shdr); in mark_section_group() local 878 elf_strptr (fileinfo->elf, fileinfo->shstrndx, shdr->sh_name)); in mark_section_group() 884 shdr->sh_name)) in mark_section_group() 886 && ((shdr->sh_type != SHT_RELA && shdr->sh_type != SHT_REL) in mark_section_group() 890 SCNINFO_SHDR (fileinfo->scninfo[shdr->sh_info].shdr).sh_name))))) in mark_section_group() [all …]
|
/external/elfutils/libasm/ |
D | asm_end.c | 79 GElf_Shdr *shdr; in binary_end() local 145 shdr = gelf_getshdr (strscn, &shdr_mem); in binary_end() 146 if (strtabdata == NULL || shdr == NULL) in binary_end() 155 shdr->sh_type = SHT_STRTAB; in binary_end() 156 assert (shdr->sh_entsize == 0); in binary_end() 158 (void) gelf_update_shdr (strscn, shdr); in binary_end() 163 shdr = gelf_getshdr (symscn, &shdr_mem); in binary_end() 164 if (data == NULL || shdr == NULL) in binary_end() 228 shdr = gelf_getshdr (xndxscn, &shdr_mem); in binary_end() 229 if (xndxdata == NULL || shdr == NULL) in binary_end() [all …]
|
/external/syslinux/com32/tools/ |
D | relocs.c | 28 Elf32_Shdr shdr; member 207 name = sec_strtab + secs[shndx].shdr.sh_name; in sec_name() 311 Elf32_Shdr shdr; in read_shdrs() local 324 if (fread(&shdr, sizeof shdr, 1, fp) != 1) in read_shdrs() 327 sec->shdr.sh_name = elf32_to_cpu(shdr.sh_name); in read_shdrs() 328 sec->shdr.sh_type = elf32_to_cpu(shdr.sh_type); in read_shdrs() 329 sec->shdr.sh_flags = elf32_to_cpu(shdr.sh_flags); in read_shdrs() 330 sec->shdr.sh_addr = elf32_to_cpu(shdr.sh_addr); in read_shdrs() 331 sec->shdr.sh_offset = elf32_to_cpu(shdr.sh_offset); in read_shdrs() 332 sec->shdr.sh_size = elf32_to_cpu(shdr.sh_size); in read_shdrs() [all …]
|
/external/libunwind/src/ |
D | elfxx.c | 143 Elf_W(Shdr) shdr; in elf_w() 144 GET_SHDR_FIELD(ei, str_soff, &shdr, sh_offset); in elf_w() 145 GET_SHDR_FIELD(ei, str_soff, &shdr, sh_size); in elf_w() 146 if (shdr.sh_offset + shdr.sh_size > size) { in elf_w() 148 (unsigned long) (shdr.sh_offset + shdr.sh_size), in elf_w() 153 Debug (16, "strtab=0x%lx\n", (long) shdr.sh_offset); in elf_w() 154 *offset = shdr.sh_offset; in elf_w() 170 Elf_W(Shdr) shdr; in elf_w() 171 GET_SHDR_FIELD(ei, shdr_offset, &shdr, sh_type); in elf_w() 172 switch (shdr.sh_type) { in elf_w() [all …]
|
/external/elfutils/libdwfl/ |
D | derelocate.c | 92 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in cache_sections() local 93 if (shdr == NULL) in cache_sections() 96 if ((shdr->sh_flags & SHF_ALLOC) && shdr->sh_addr == 0 in cache_sections() 102 &shdr->sh_addr) != DWFL_E_NOERROR) in cache_sections() 104 shdr = gelf_getshdr (scn, &shdr_mem); in cache_sections() 105 if (unlikely (shdr == NULL)) in cache_sections() 109 if (shdr->sh_flags & SHF_ALLOC) in cache_sections() 112 shdr->sh_name); in cache_sections() 128 newref->start = dwfl_adjusted_address (mod, shdr->sh_addr); in cache_sections() 129 newref->end = newref->start + shdr->sh_size; in cache_sections() [all …]
|
D | dwfl_report_elf.c | 74 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in __libdwfl_elf_address_range() local 75 if (unlikely (shdr == NULL)) in __libdwfl_elf_address_range() 78 if (shdr->sh_flags & SHF_ALLOC) in __libdwfl_elf_address_range() 80 const GElf_Xword align = shdr->sh_addralign ?: 1; in __libdwfl_elf_address_range() 82 if (shdr->sh_addr == 0 in __libdwfl_elf_address_range() 88 shdr->sh_addr = next; in __libdwfl_elf_address_range() 92 start = base = shdr->sh_addr; in __libdwfl_elf_address_range() 129 end = shdr->sh_addr + shdr->sh_size; in __libdwfl_elf_address_range() 130 if (likely (shdr->sh_addr != 0) in __libdwfl_elf_address_range() 131 && unlikely (! gelf_update_shdr (scn, shdr))) in __libdwfl_elf_address_range() [all …]
|
D | relocate.c | 124 GElf_Shdr shdr_mem, *shdr = gelf_getshdr (scn, &shdr_mem); in relocate_getsym() local 125 if (shdr != NULL) in relocate_getsym() 128 if ((shdr->sh_type == SHT_SYMTAB in relocate_getsym() 129 || shdr->sh_type == SHT_SYMTAB_SHNDX) in relocate_getsym() 130 && (shdr->sh_flags & SHF_COMPRESSED) != 0) in relocate_getsym() 134 switch (shdr->sh_type) in relocate_getsym() 141 cache->strtabndx = shdr->sh_link; in relocate_getsym() 221 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in resolve_symbol() local 222 if (shdr == NULL) in resolve_symbol() 230 shdr->sh_name); in resolve_symbol() [all …]
|
/external/syslinux/gpxe/src/arch/i386/core/ |
D | freebsd_loader.c | 33 static Elf32_Shdr *shdr; /* To support the FreeBSD kludge! */ variable 60 shdr = 0; in elf_freebsd_probe() 135 if (shdr == 0) in elf_freebsd_debug_loader() 147 shdr = (Elf32_Shdr *)phys_to_virt(estate.curaddr); in elf_freebsd_debug_loader() 167 if (shdr[i].sh_type == SHT_SYMTAB) in elf_freebsd_debug_loader() 176 if ((shdr[i].sh_offset >= estate.p.phdr32[j].p_offset) && in elf_freebsd_debug_loader() 177 ((shdr[i].sh_offset + shdr[i].sh_size) <= in elf_freebsd_debug_loader() 180 shdr[i].sh_offset=0; in elf_freebsd_debug_loader() 181 shdr[i].sh_size=0; in elf_freebsd_debug_loader() 186 if ((shdr[i].sh_offset != 0) && (shdr[i].sh_size != 0)) in elf_freebsd_debug_loader() [all …]
|