Home
last modified time | relevance | path

Searched refs:shdr (Results 1 – 25 of 123) sorted by relevance

12345

/external/google-breakpad/src/common/linux/
Dsynth_elf_unittest.cc240 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/
Dupdate4.c43 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 …]
Daddsections.c134 GElf_Shdr *shdr = gelf_getshdr (shstrtab_scn, &shdr_mem); in add_sections() local
135 if (shdr == NULL) in add_sections()
142 size_t shstrtab_idx = shdr->sh_name; in add_sections()
143 shdr->sh_name = old_shstrtab_idx; in add_sections()
145 if (gelf_update_shdr (shstrtab_scn, shdr) == 0) in add_sections()
177 shdr = gelf_getshdr (scn, &shdr_mem); in add_sections()
178 if (shdr == NULL) in add_sections()
185 shdr->sh_type = SHT_PROGBITS; in add_sections()
186 shdr->sh_flags = 0; in add_sections()
187 shdr->sh_addr = 0; in add_sections()
[all …]
Dasm-tst1.c158 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 …]
Dasm-tst2.c174 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 …]
Dfillfile.c79 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in create_strtab() local
80 if (shdr == NULL) in create_strtab()
87 shdr->sh_type = SHT_STRTAB; in create_strtab()
88 shdr->sh_flags = 0; in create_strtab()
89 shdr->sh_addr = 0; in create_strtab()
90 shdr->sh_link = SHN_UNDEF; in create_strtab()
91 shdr->sh_info = SHN_UNDEF; in create_strtab()
92 shdr->sh_addralign = 1; in create_strtab()
93 shdr->sh_entsize = 0; in create_strtab()
94 shdr->sh_name = add_strtab_entry (scn, ".strtab"); in create_strtab()
[all …]
Dasm-tst9.c208 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 …]
Dsectiondump.c82 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 …]
Dalldts.c130 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/elfutils/src/
Dunstrip.c363 section_can_shrink (const GElf_Shdr *shdr) in section_can_shrink() argument
365 switch (shdr->sh_type) in section_can_shrink()
394 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (elf, i), &shdr_mem); in symtab_count_leading_section_symbols() local
395 ELF_CHECK (shdr != NULL, _("cannot get section header: %s")); in symtab_count_leading_section_symbols()
403 sym->st_value = shdr->sh_addr; in symtab_count_leading_section_symbols()
435 adjust_relocs (Elf_Scn *outscn, Elf_Scn *inscn, const GElf_Shdr *shdr, in adjust_relocs() argument
447 switch (shdr->sh_type) in adjust_relocs()
450 if (shdr->sh_entsize == 0) in adjust_relocs()
453 for (size_t i = 0; i < shdr->sh_size / shdr->sh_entsize; ++i) in adjust_relocs()
464 if (shdr->sh_entsize == 0) in adjust_relocs()
[all …]
Dstrip.c379 GElf_Shdr *shdr = gelf_getshdr (sec, &mem); in secndx_name() local
380 if (shdr == NULL || elf_getshdrstrndx (elf, &shstrndx) < 0) in secndx_name()
382 return elf_strptr (elf, shstrndx, shdr->sh_name) ?: "???"; in secndx_name()
391 GElf_Shdr *shdr = gelf_getshdr (symscn, &shdr_mem); in get_xndxdata() local
392 if (shdr != NULL && shdr->sh_type == SHT_SYMTAB) in get_xndxdata()
459 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in remove_debug_relocations() local
460 if (shdr->sh_type == SHT_REL || shdr->sh_type == SHT_RELA) in remove_debug_relocations()
465 Elf_Scn *tscn = elf_getscn (elf, shdr->sh_info); in remove_debug_relocations()
512 Elf64_Word symt = shdr->sh_link; in remove_debug_relocations()
661 if (shdr->sh_entsize == 0) in remove_debug_relocations()
[all …]
Delfcompress.c229 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in compress_section() local
230 if (shdr == NULL) in compress_section()
235 float new = shdr->sh_size; in compress_section()
238 orig_size, shdr->sh_size, (new / orig) * 100); in compress_section()
463 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in process_file() local
464 if (shdr == NULL) in process_file()
470 const char *sname = elf_strptr (elf, shdrstrndx, shdr->sh_name); in process_file()
480 && (shdr->sh_flags & SHF_COMPRESSED) == 0 in process_file()
487 && (shdr->sh_flags & SHF_COMPRESSED) != 0) in process_file()
498 else if (shdr->sh_type != SHT_NOBITS in process_file()
[all …]
Delflint.c96 GElf_Shdr *shdr, int idx);
303 GElf_Shdr *shdr; in section_name() local
309 shdr = gelf_getshdr (elf_getscn (ebl->elf, idx), &shdr_mem); in section_name()
310 if (shdr == NULL) in section_name()
313 ret = elf_strptr (ebl->elf, shstrndx, shdr->sh_name); in section_name()
433 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem); in check_elf_header() local
434 if (shdr != NULL) in check_elf_header()
437 if (shdr->sh_size == 0) in check_elf_header()
441 shnum = shdr->sh_size; in check_elf_header()
450 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem); in check_elf_header() local
[all …]
Dfindtextrel.c248 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in process_file() local
250 if (shdr == NULL) in process_file()
258 switch (shdr->sh_type) in process_file()
266 size_t entries = (shdr->sh_entsize == 0 in process_file()
267 ? 0 : shdr->sh_size / shdr->sh_entsize); in process_file()
389 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in process_file() local
391 if (shdr == NULL) in process_file()
400 if ((shdr->sh_type == SHT_REL || shdr->sh_type == SHT_RELA) in process_file()
403 symscn = elf_getscn (elf, shdr->sh_link); in process_file()
408 (size_t) shdr->sh_link, fname, elf_errmsg (-1)); in process_file()
[all …]
/external/elfutils/libelf/
Delf32_getshdr.c58 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 …]
Delf_compress_gnu.c64 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 …]
Delf_compress.c369 Elf32_Shdr *shdr = elf32_getshdr (scn); in elf_compress() local
370 if (shdr == NULL) in elf_compress()
373 sh_flags = shdr->sh_flags; in elf_compress()
374 sh_type = shdr->sh_type; in elf_compress()
375 sh_addralign = shdr->sh_addralign; in elf_compress()
379 Elf64_Shdr *shdr = elf64_getshdr (scn); in elf_compress() local
380 if (shdr == NULL) in elf_compress()
383 sh_flags = shdr->sh_flags; in elf_compress()
384 sh_type = shdr->sh_type; in elf_compress()
385 sh_addralign = shdr->sh_addralign; in elf_compress()
[all …]
Delf32_updatenull.c184 update_if_changed (scn0->shdr.ELFW(e,LIBELFBITS)->sh_size, in __elfw2()
199 if (scn1 != NULL && scn1->shdr.ELFW(e,LIBELFBITS) == NULL) in __elfw2()
207 ElfW2(LIBELFBITS,Shdr) *shdr = scn->shdr.ELFW(e,LIBELFBITS); in __elfw2()
210 assert (shdr != NULL); in __elfw2()
211 ElfW2(LIBELFBITS,Word) sh_entsize = shdr->sh_entsize; in __elfw2()
212 ElfW2(LIBELFBITS,Word) sh_align = shdr->sh_addralign ?: 1; in __elfw2()
220 switch (shdr->sh_type) in __elfw2()
263 update_if_changed (shdr->sh_entsize, sh_entsize, in __elfw2()
304 > shdr->sh_size)) in __elfw2()
333 (shdr->sh_type != SHT_NOBITS in __elfw2()
[all …]
/external/v4l2_codec2/vda/
Dh264_parser.cc1133 H264SliceHeader* shdr) { in ParseRefPicListModifications() argument
1136 if (!shdr->IsISlice() && !shdr->IsSISlice()) { in ParseRefPicListModifications()
1137 READ_BOOL_OR_RETURN(&shdr->ref_pic_list_modification_flag_l0); in ParseRefPicListModifications()
1138 if (shdr->ref_pic_list_modification_flag_l0) { in ParseRefPicListModifications()
1139 res = ParseRefPicListModification(shdr->num_ref_idx_l0_active_minus1, in ParseRefPicListModifications()
1140 shdr->ref_list_l0_modifications); in ParseRefPicListModifications()
1146 if (shdr->IsBSlice()) { in ParseRefPicListModifications()
1147 READ_BOOL_OR_RETURN(&shdr->ref_pic_list_modification_flag_l1); in ParseRefPicListModifications()
1148 if (shdr->ref_pic_list_modification_flag_l1) { in ParseRefPicListModifications()
1149 res = ParseRefPicListModification(shdr->num_ref_idx_l1_active_minus1, in ParseRefPicListModifications()
[all …]
/external/elfutils/libasm/
Dasm_end.c78 GElf_Shdr *shdr; in binary_end() local
144 shdr = gelf_getshdr (strscn, &shdr_mem); in binary_end()
145 if (strtabdata == NULL || shdr == NULL) in binary_end()
154 shdr->sh_type = SHT_STRTAB; in binary_end()
155 assert (shdr->sh_entsize == 0); in binary_end()
157 (void) gelf_update_shdr (strscn, shdr); in binary_end()
162 shdr = gelf_getshdr (symscn, &shdr_mem); in binary_end()
163 if (data == NULL || shdr == NULL) in binary_end()
227 shdr = gelf_getshdr (xndxscn, &shdr_mem); in binary_end()
228 if (xndxdata == NULL || shdr == NULL) in binary_end()
[all …]
/external/libunwind/src/
Delfxx.c143 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/u-boot/tools/
Dzynqmpbif.c541 Elf64_Shdr *shdr; in elf2flat64() local
547 shdr = (void *)(elf + le64_to_cpu(ehdr->e_shoff)); in elf2flat64()
550 for (i = 0; i < le64_to_cpu(ehdr->e_shnum); i++, shdr++) { in elf2flat64()
551 if (!shdr->sh_size || !shdr->sh_addr || in elf2flat64()
552 !(shdr->sh_flags & SHF_ALLOC) || in elf2flat64()
553 (shdr->sh_type == SHT_NOBITS)) in elf2flat64()
556 if (le64_to_cpu(shdr->sh_addr) < min_addr) in elf2flat64()
557 min_addr = le64_to_cpu(shdr->sh_addr); in elf2flat64()
558 if ((le64_to_cpu(shdr->sh_addr) + le64_to_cpu(shdr->sh_size)) > in elf2flat64()
560 max_addr = le64_to_cpu(shdr->sh_addr) + in elf2flat64()
[all …]
/external/elfutils/libdwfl/
Dderelocate.c102 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in cache_sections() local
103 if (shdr == NULL) in cache_sections()
106 if ((shdr->sh_flags & SHF_ALLOC) && shdr->sh_addr == 0 in cache_sections()
112 &shdr->sh_addr) != DWFL_E_NOERROR) in cache_sections()
114 shdr = gelf_getshdr (scn, &shdr_mem); in cache_sections()
115 if (unlikely (shdr == NULL)) in cache_sections()
119 if (shdr->sh_flags & SHF_ALLOC) in cache_sections()
122 shdr->sh_name); in cache_sections()
138 newref->start = dwfl_adjusted_address (mod, shdr->sh_addr); in cache_sections()
139 newref->end = newref->start + shdr->sh_size; in cache_sections()
[all …]
Drelocate.c129 GElf_Shdr shdr_mem, *shdr = gelf_getshdr (scn, &shdr_mem); in relocate_getsym() local
130 if (shdr != NULL) in relocate_getsym()
133 if ((shdr->sh_type == SHT_SYMTAB in relocate_getsym()
134 || shdr->sh_type == SHT_SYMTAB_SHNDX) in relocate_getsym()
135 && (shdr->sh_flags & SHF_COMPRESSED) != 0) in relocate_getsym()
139 switch (shdr->sh_type) in relocate_getsym()
146 cache->strtabndx = shdr->sh_link; in relocate_getsym()
226 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in resolve_symbol() local
227 if (shdr == NULL) in resolve_symbol()
235 shdr->sh_name); in resolve_symbol()
[all …]
/external/u-boot/cmd/
Delf.c104 Elf32_Shdr *shdr; /* Section header structure pointer */ in load_elf_image_shdr() local
112 shdr = (Elf32_Shdr *)(addr + ehdr->e_shoff + in load_elf_image_shdr()
115 if (shdr->sh_type == SHT_STRTAB) in load_elf_image_shdr()
116 strtab = (unsigned char *)(addr + shdr->sh_offset); in load_elf_image_shdr()
120 shdr = (Elf32_Shdr *)(addr + ehdr->e_shoff + in load_elf_image_shdr()
123 if (!(shdr->sh_flags & SHF_ALLOC) || in load_elf_image_shdr()
124 shdr->sh_addr == 0 || shdr->sh_size == 0) { in load_elf_image_shdr()
130 (shdr->sh_type == SHT_NOBITS) ? "Clear" : "Load", in load_elf_image_shdr()
131 &strtab[shdr->sh_name], in load_elf_image_shdr()
132 (unsigned long)shdr->sh_addr, in load_elf_image_shdr()
[all …]

12345