Searched refs:shdr (Results 1 - 25 of 115) sorted by relevance

12345

/external/elfutils/libebl/
H A Debl_check_special_section.c37 ebl_check_special_section (Ebl *ebl, int ndx, const GElf_Shdr *shdr, argument
40 return ebl != NULL && ebl->check_special_section (ebl, ndx, shdr, sname);
H A Deblsectionstripp.c38 ebl_section_strip_p (Ebl *ebl, const GElf_Ehdr *ehdr, const GElf_Shdr *shdr, argument
49 if (shdr->sh_type == SHT_RELA || shdr->sh_type == SHT_REL)
51 Elf_Scn *scn_l = elf_getscn (ebl->elf, (shdr)->sh_info);
66 return SECTION_STRIP_P (shdr, name, remove_comment);
/external/elfutils/libdwelf/
H A Ddwelf_scn_gnu_compressed_size.c42 GElf_Shdr shdr;
43 if (gelf_getshdr (scn, &shdr) == NULL)
47 if ((shdr.sh_flags & SHF_ALLOC) != 0
48 || shdr.sh_type == SHT_NULL
49 || shdr.sh_type == SHT_NOBITS)
/external/elfutils/libelf/
H A Delf_compress_gnu.c64 Elf32_Shdr *shdr = elf32_getshdr (scn); local
65 if (shdr == NULL)
68 sh_flags = shdr->sh_flags;
69 sh_type = shdr->sh_type;
70 sh_addralign = shdr->sh_addralign;
74 Elf64_Shdr *shdr = elf64_getshdr (scn); local
75 if (shdr == NULL)
78 sh_flags = shdr->sh_flags;
79 sh_type = shdr->sh_type;
80 sh_addralign = shdr
123 Elf32_Shdr *shdr = elf32_getshdr (scn); local
128 Elf64_Shdr *shdr = elf64_getshdr (scn); local
187 Elf32_Shdr *shdr = elf32_getshdr (scn); local
192 Elf64_Shdr *shdr = elf64_getshdr (scn); local
[all...]
H A Delf32_getchdr.c45 ElfW2(LIBELFBITS,Shdr) *shdr = elfw2(LIBELFBITS,getshdr) (scn);
46 if (shdr == NULL)
51 if ((shdr->sh_flags & SHF_ALLOC) != 0)
57 if (shdr->sh_type == SHT_NULL
58 || shdr->sh_type == SHT_NOBITS)
64 if ((shdr->sh_flags & SHF_COMPRESSED) == 0)
H A Dgelf_getshdr.c59 Elf32_Shdr *shdr local
60 = scn->shdr.e32 ?: __elf32_getshdr_rdlock (scn);
62 if (shdr == NULL)
69 dst->name = shdr->name
85 Elf64_Shdr *shdr local
86 = scn->shdr.e64 ?: __elf64_getshdr_rdlock (scn);
88 if (shdr == NULL)
95 result = memcpy (dst, shdr, sizeof (GElf_Shdr));
H A Dgelf_update_shdr.c54 Elf32_Shdr *shdr local
55 = scn->shdr.e32 ?: __elf32_getshdr_wrlock (scn);
57 if (shdr == NULL)
75 shdr->name = src->name
89 Elf64_Shdr *shdr local
90 = scn->shdr.e64 ?: __elf64_getshdr_wrlock (scn);
92 if (shdr == NULL)
99 (void) memcpy (shdr, src, sizeof (GElf_Shdr));
H A Delf32_getshdr.c58 result = scn->shdr.ELFW(e,LIBELFBITS);
70 ElfW2(LIBELFBITS,Shdr) *shdr = elf->state.ELFW(elf,LIBELFBITS).shdr =
72 if (elf->state.ELFW(elf,LIBELFBITS).shdr == NULL)
113 memcpy (shdr, file_shdr, size);
140 CONVERT_TO (shdr[cnt].sh_name, notcvt[cnt].sh_name);
141 CONVERT_TO (shdr[cnt].sh_type, notcvt[cnt].sh_type);
142 CONVERT_TO (shdr[cnt].sh_flags, notcvt[cnt].sh_flags);
143 CONVERT_TO (shdr[cnt].sh_addr, notcvt[cnt].sh_addr);
144 CONVERT_TO (shdr[cn
[all...]
H A Delf-knowledge.h37 #define SECTION_STRIP_P(shdr, name, remove_comment) \
39 (((shdr)->sh_flags & SHF_ALLOC) == 0 \
41 && (shdr)->sh_type != SHT_NOTE \
42 && (((shdr)->sh_type) != SHT_PROGBITS \
H A Delf32_checksum.c94 GElf_Shdr *shdr; local
98 shdr = INTUSE(gelf_getshdr) (scn, &shdr_mem);
99 if (shdr == NULL)
106 if (SECTION_STRIP_P (shdr,
107 INTUSE(elf_strptr) (elf, shstrndx, shdr->sh_name),
113 if (shdr->sh_type == SHT_NOBITS)
H A Delf32_offscn.c62 && unlikely (runp->data[0].shdr.ELFW(e,LIBELFBITS) == NULL)
74 if (runp->data[i].shdr.ELFW(e,LIBELFBITS)->sh_offset == offset)
81 if (runp->data[i].shdr.ELFW(e,LIBELFBITS)->sh_size != 0
82 && runp->data[i].shdr.ELFW(e,LIBELFBITS)->sh_type != SHT_NOBITS)
/external/elfutils/tests/
H A Dupdate4.c43 Elf32_Shdr *shdr; local
122 shdr = elf32_getshdr (scn);
123 if (shdr == NULL)
131 shdr->sh_type = SHT_PROGBITS;
132 shdr->sh_flags = SHF_ALLOC | SHF_EXECINSTR;
133 shdr->sh_addr = 0;
134 shdr->sh_link = 0;
135 shdr->sh_info = 0;
136 shdr->sh_entsize = 1;
158 shdr
[all...]
H A Dasm-tst1.c158 GElf_Shdr *shdr; local
168 shdr = gelf_getshdr (scn, &shdr_mem);
169 if (shdr == NULL)
177 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
181 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
186 if (shdr->sh_type != (cnt == 3 ? SHT_STRTAB : SHT_PROGBITS))
192 if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_EXECINSTR))
193 || (cnt == 2 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
194 || (cnt == 3 && shdr->sh_flags != 0))
200 if (shdr
[all...]
H A Dasm-tst2.c174 GElf_Shdr *shdr; local
184 shdr = gelf_getshdr (scn, &shdr_mem);
185 if (shdr == NULL)
193 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
197 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
202 if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS))
208 if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
209 || (cnt == 2 && shdr->sh_flags != 0))
215 if (shdr->sh_addr != 0)
221 if ((cnt == 1 && shdr
[all...]
H A Dsectiondump.c82 GElf_Shdr *shdr; local
88 shdr = gelf_getshdr (scn, &shdr_mem);
89 if (ehdr == NULL || shdr == NULL)
103 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
104 shdr->sh_type,
105 shdr->sh_flags,
106 shdr->sh_addr,
107 shdr->sh_offset,
108 shdr->sh_size,
109 shdr
[all...]
H A Dasm-tst9.c208 GElf_Shdr *shdr; local
218 shdr = gelf_getshdr (escn, &shdr_mem);
219 if (shdr == NULL)
227 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
231 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
236 if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS))
242 if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
243 || (cnt == 2 && shdr->sh_flags != 0))
249 if (shdr->sh_addr != 0)
255 if ((cnt == 1 && shdr
[all...]
H A Dupdate3.c43 Elf32_Shdr *shdr; local
118 shdr = elf32_getshdr (scn);
119 if (shdr == NULL)
127 shdr->sh_type = SHT_STRTAB;
128 shdr->sh_flags = 0;
129 shdr->sh_addr = 0;
130 shdr->sh_link = SHN_UNDEF;
131 shdr->sh_info = SHN_UNDEF;
132 shdr->sh_addralign = 1;
133 shdr
[all...]
H A Dalldts.c130 Elf32_Shdr *shdr = elf32_getshdr (scn); local
131 if (shdr == NULL)
141 const Elf32_Off *const dynscn_offset = &shdr->sh_offset;
142 shdr->sh_type = SHT_DYNAMIC;
143 shdr->sh_flags = SHF_ALLOC | SHF_WRITE;
144 shdr->sh_link = SHN_UNDEF;
145 shdr->sh_info = SHN_UNDEF;
147 shdr->sh_addr = 0x1a0;
187 shdr = elf32_getshdr (scn);
188 if (shdr
[all...]
/external/google-breakpad/src/common/linux/
H A Dsynth_elf_unittest.cc240 const Shdr* shdr = local
242 EXPECT_EQ(0U, shdr[0].sh_name);
243 EXPECT_EQ(static_cast<unsigned int>(SHT_NULL), shdr[0].sh_type);
244 EXPECT_EQ(0U, shdr[0].sh_flags);
245 EXPECT_EQ(0U, shdr[0].sh_addr);
246 EXPECT_EQ(0U, shdr[0].sh_offset);
247 EXPECT_EQ(0U, shdr[0].sh_size);
248 EXPECT_EQ(0U, shdr[0].sh_link);
249 EXPECT_EQ(0U, shdr[0].sh_info);
250 EXPECT_EQ(0U, shdr[
315 const Shdr* shdr = local
[all...]
/external/elfutils/backends/
H A Daarch64_symbol.c79 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
80 if (shdr != NULL)
82 sname = elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name);
84 return (sym->st_value >= shdr->sh_addr
85 && sym->st_value < shdr->sh_addr + shdr->sh_size);
/external/elfutils/libasm/
H A Dasm_end.c79 GElf_Shdr *shdr; local
145 shdr = gelf_getshdr (strscn, &shdr_mem);
146 if (strtabdata == NULL || shdr == NULL)
155 shdr->sh_type = SHT_STRTAB;
156 assert (shdr->sh_entsize == 0);
158 (void) gelf_update_shdr (strscn, shdr);
163 shdr = gelf_getshdr (symscn, &shdr_mem);
164 if (data == NULL || shdr == NULL)
228 shdr = gelf_getshdr (xndxscn, &shdr_mem);
229 if (xndxdata == NULL || shdr
[all...]
H A Dasm_newscn_ingrp.c67 GElf_Shdr *shdr = gelf_getshdr (result->data.main.scn, &shdr_mem); local
69 assert (shdr != NULL);
70 shdr->sh_flags |= SHF_GROUP;
72 (void) gelf_update_shdr (result->data.main.scn, shdr);
/external/elfutils/src/
H A Dunstrip.c356 section_can_shrink (const GElf_Shdr *shdr)
358 switch (shdr->sh_type)
387 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (elf, i), &shdr_mem);
388 ELF_CHECK (shdr != NULL, _("cannot get section header: %s"));
396 sym->st_value = shdr->sh_addr;
428 adjust_relocs (Elf_Scn *outscn, Elf_Scn *inscn, const GElf_Shdr *shdr,
440 switch (shdr->sh_type)
443 for (size_t i = 0; i < shdr->sh_size / shdr->sh_entsize; ++i)
454 for (size_t i = 0; i < shdr
355 section_can_shrink(const GElf_Shdr *shdr) argument
386 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (elf, i), &shdr_mem); local
427 adjust_relocs(Elf_Scn *outscn, Elf_Scn *inscn, const GElf_Shdr *shdr, size_t map[], const GElf_Shdr *symshdr) argument
576 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
593 GElf_Shdr *shdr = gelf_getshdr (symscn, &shdr_mem); local
690 GElf_Shdr shdr; member in struct:section
827 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (outelf, s->shndx), local
922 sections_match(const struct section *sections, size_t i, const GElf_Shdr *shdr, const char *name) argument
935 find_alloc_section(const GElf_Shdr *shdr, GElf_Addr bias, const char *name, struct section sections[], size_t nalloc) argument
964 get_section_name(size_t ndx, const GElf_Shdr *shdr, const Elf_Data *shstrtab) argument
1057 void *shdr = xmalloc (shdr_bytes); local
1117 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
1244 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
1266 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
1308 GElf_Shdr *shdr = gelf_getshdr (scn, &sections[i].shdr); local
1335 find_unalloc_section(const GElf_Shdr *shdr, const char *name) argument
1368 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
1489 GElf_Shdr *shdr = gelf_getshdr (unstripped_symtab, &shdr_mem); local
1542 GElf_Shdr *shdr = gelf_getshdr (sec->outscn, &shdr_mem); local
1657 GElf_Shdr *shdr = gelf_getshdr (unstripped_symtab, &shdr_mem); local
1890 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
[all...]
/external/elfutils/libdwfl/
H A Ddwfl_report_elf.c74 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
75 if (unlikely (shdr == NULL))
78 if (shdr->sh_flags & SHF_ALLOC)
80 const GElf_Xword align = shdr->sh_addralign ?: 1;
82 if (shdr->sh_addr == 0
88 shdr->sh_addr = next;
92 start = base = shdr->sh_addr;
129 end = shdr->sh_addr + shdr->sh_size;
130 if (likely (shdr
[all...]
H A Dderelocate.c92 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
93 if (shdr == NULL)
96 if ((shdr->sh_flags & SHF_ALLOC) && shdr->sh_addr == 0
102 &shdr->sh_addr) != DWFL_E_NOERROR)
104 shdr = gelf_getshdr (scn, &shdr_mem);
105 if (unlikely (shdr == NULL))
109 if (shdr->sh_flags & SHF_ALLOC)
112 shdr->sh_name);
128 newref->start = dwfl_adjusted_address (mod, shdr
195 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
[all...]

Completed in 1499 milliseconds

12345