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

1234

/external/elfutils/libebl/
H A Debl_check_special_section.c58 ebl_check_special_section (ebl, ndx, shdr, sname)
61 const GElf_Shdr *shdr;
64 return ebl != NULL && ebl->check_special_section (ebl, ndx, shdr, sname);
H A Deblsectionstripp.c59 ebl_section_strip_p (Ebl *ebl, const GElf_Ehdr *ehdr, const GElf_Shdr *shdr, argument
70 if (shdr->sh_type == SHT_RELA || shdr->sh_type == SHT_REL)
72 Elf_Scn *scn_l = elf_getscn (ebl->elf, (shdr)->sh_info);
87 return SECTION_STRIP_P (shdr, name, remove_comment);
/external/elfutils/tests/
H A Dupdate4.c51 Elf32_Shdr *shdr; local
130 shdr = elf32_getshdr (scn);
131 if (shdr == NULL)
139 shdr->sh_type = SHT_PROGBITS;
140 shdr->sh_flags = SHF_ALLOC | SHF_EXECINSTR;
141 shdr->sh_addr = 0;
142 shdr->sh_link = 0;
143 shdr->sh_info = 0;
144 shdr->sh_entsize = 1;
166 shdr
[all...]
H A Dasm-tst1.c166 GElf_Shdr *shdr; local
176 shdr = gelf_getshdr (scn, &shdr_mem);
177 if (shdr == NULL)
185 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
189 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
194 if (shdr->sh_type != (cnt == 3 ? SHT_STRTAB : SHT_PROGBITS))
200 if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_EXECINSTR))
201 || (cnt == 2 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
202 || (cnt == 3 && shdr->sh_flags != 0))
208 if (shdr
[all...]
H A Dasm-tst2.c182 GElf_Shdr *shdr; local
192 shdr = gelf_getshdr (scn, &shdr_mem);
193 if (shdr == NULL)
201 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
205 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
210 if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS))
216 if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
217 || (cnt == 2 && shdr->sh_flags != 0))
223 if (shdr->sh_addr != 0)
229 if ((cnt == 1 && shdr
[all...]
H A Dsectiondump.c90 GElf_Shdr *shdr; local
96 shdr = gelf_getshdr (scn, &shdr_mem);
97 if (ehdr == NULL || shdr == NULL)
111 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
112 shdr->sh_type,
113 shdr->sh_flags,
114 shdr->sh_addr,
115 shdr->sh_offset,
116 shdr->sh_size,
117 shdr
[all...]
H A Dasm-tst9.c216 GElf_Shdr *shdr; local
226 shdr = gelf_getshdr (scn, &shdr_mem);
227 if (shdr == NULL)
235 if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
239 elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
244 if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS))
250 if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
251 || (cnt == 2 && shdr->sh_flags != 0))
257 if (shdr->sh_addr != 0)
263 if ((cnt == 1 && shdr
[all...]
H A Dupdate3.c50 Elf32_Shdr *shdr; local
125 shdr = elf32_getshdr (scn);
126 if (shdr == NULL)
134 shdr->sh_type = SHT_STRTAB;
135 shdr->sh_flags = 0;
136 shdr->sh_addr = 0;
137 shdr->sh_link = SHN_UNDEF;
138 shdr->sh_info = SHN_UNDEF;
139 shdr->sh_addralign = 1;
140 shdr
[all...]
/external/elfutils/libelf/
H A Dgelf_getshdr.c82 Elf32_Shdr *shdr local
83 = scn->shdr.e32 ?: __elf32_getshdr_rdlock (scn);
85 if (shdr == NULL)
92 dst->name = shdr->name
108 Elf64_Shdr *shdr local
109 = scn->shdr.e64 ?: __elf64_getshdr_rdlock (scn);
111 if (shdr == NULL)
118 result = memcpy (dst, shdr, sizeof (GElf_Shdr));
H A Dgelf_update_shdr.c75 Elf32_Shdr *shdr local
76 = scn->shdr.e32 ?: __elf32_getshdr_wrlock (scn);
78 if (shdr == NULL)
96 shdr->name = src->name
110 Elf64_Shdr *shdr local
111 = scn->shdr.e64 ?: __elf64_getshdr_wrlock (scn);
113 if (shdr == NULL)
120 (void) memcpy (shdr, src, sizeof (GElf_Shdr));
H A Delf-knowledge.h58 #define SECTION_STRIP_P(shdr, name, remove_comment) \
60 (((shdr)->sh_flags & SHF_ALLOC) == 0 \
62 && (shdr)->sh_type != SHT_NOTE \
63 && (((shdr)->sh_type) != SHT_PROGBITS \
71 && (shdr)->sh_type < SHT_NUM)
H A Delf32_getshdr.c79 result = scn->shdr.ELFW(e,LIBELFBITS);
90 ElfW2(LIBELFBITS,Shdr) *shdr = elf->state.ELFW(elf,LIBELFBITS).shdr =
92 if (elf->state.ELFW(elf,LIBELFBITS).shdr == NULL)
117 memcpy (shdr, file_shdr, size);
137 CONVERT_TO (shdr[cnt].sh_name, notcvt[cnt].sh_name);
138 CONVERT_TO (shdr[cnt].sh_type, notcvt[cnt].sh_type);
139 CONVERT_TO (shdr[cnt].sh_flags, notcvt[cnt].sh_flags);
140 CONVERT_TO (shdr[cnt].sh_addr, notcvt[cnt].sh_addr);
141 CONVERT_TO (shdr[cn
[all...]
H A Delf32_updatenull.c199 update_if_changed (scn0->shdr.ELFW(e,LIBELFBITS)->sh_size,
208 if (list->data[1].shdr.ELFW(e,LIBELFBITS) == NULL)
216 ElfW2(LIBELFBITS,Shdr) *shdr = scn->shdr.ELFW(e,LIBELFBITS);
219 assert (shdr != NULL);
220 ElfW2(LIBELFBITS,Word) sh_entsize = shdr->sh_entsize;
221 ElfW2(LIBELFBITS,Word) sh_align = shdr->sh_addralign ?: 1;
224 switch (shdr->sh_type)
267 update_if_changed (shdr->sh_entsize, sh_entsize,
309 > shdr
[all...]
H A Delf32_checksum.c121 GElf_Shdr *shdr; local
125 shdr = INTUSE(gelf_getshdr) (scn, &shdr_mem);
126 if (shdr == NULL)
133 if (SECTION_STRIP_P (shdr,
134 INTUSE(elf_strptr) (elf, shstrndx, shdr->sh_name),
140 if (shdr->sh_type == SHT_NOBITS)
H A Dnlist.c88 GElf_Shdr *shdr = NULL; local
117 shdr = INTUSE(gelf_getshdr) (scn, &shdr_mem);
118 if (shdr == NULL)
122 if (shdr->sh_type == SHT_SYMTAB)
129 if (shdr->sh_type == SHT_DYNSYM)
140 shdr = INTUSE(gelf_getshdr) (symscn, &shdr_mem);
149 nsyms = (shdr->sh_size
172 mem.str = INTUSE(elf_strptr) (elf, shdr->sh_link, sym->st_name);
/external/elfutils/libasm/
H A Dasm_end.c76 GElf_Shdr *shdr; local
142 shdr = gelf_getshdr (strscn, &shdr_mem);
143 if (strtabdata == NULL || shdr == NULL)
152 shdr->sh_type = SHT_STRTAB;
153 assert (shdr->sh_entsize == 0);
155 (void) gelf_update_shdr (strscn, shdr);
160 shdr = gelf_getshdr (symscn, &shdr_mem);
161 if (data == NULL || shdr == NULL)
225 shdr = gelf_getshdr (xndxscn, &shdr_mem);
226 if (xndxdata == NULL || shdr
[all...]
H A Dasm_newscn_ingrp.c68 GElf_Shdr *shdr = gelf_getshdr (result->data.main.scn, &shdr_mem); local
70 assert (shdr != NULL);
71 shdr->sh_flags |= SHF_GROUP;
73 (void) gelf_update_shdr (result->data.main.scn, shdr);
/external/elfutils/src/
H A Dunstrip.c322 section_can_shrink (const GElf_Shdr *shdr)
324 switch (shdr->sh_type)
353 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (elf, i), &shdr_mem);
354 ELF_CHECK (shdr != NULL, _("cannot get section header: %s"));
362 sym->st_value = shdr->sh_addr;
388 adjust_relocs (Elf_Scn *outscn, Elf_Scn *inscn, const GElf_Shdr *shdr,
400 switch (shdr->sh_type)
403 for (size_t i = 0; i < shdr->sh_size / shdr->sh_entsize; ++i)
414 for (size_t i = 0; i < shdr
321 section_can_shrink(const GElf_Shdr *shdr) argument
352 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (elf, i), &shdr_mem); local
387 adjust_relocs(Elf_Scn *outscn, Elf_Scn *inscn, const GElf_Shdr *shdr, size_t map[], const GElf_Shdr *symshdr) argument
535 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
552 GElf_Shdr *shdr = gelf_getshdr (symscn, &shdr_mem); local
650 GElf_Shdr shdr; member in struct:section
787 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (outelf, s->shndx), local
867 sections_match(const struct section *sections, size_t i, const GElf_Shdr *shdr, const char *name) argument
879 find_alloc_section(const GElf_Shdr *shdr, GElf_Addr bias, const char *name, struct section sections[], size_t nalloc) argument
908 get_section_name(size_t ndx, const GElf_Shdr *shdr, const Elf_Data *shstrtab) argument
999 } shdr; local
1056 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
1182 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
1204 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
1243 GElf_Shdr *shdr = gelf_getshdr (scn, &sections[i].shdr); local
1270 find_unalloc_section(const GElf_Shdr *shdr, const char *name) argument
1304 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
1426 GElf_Shdr *shdr = gelf_getshdr (unstripped_symtab, &shdr_mem); local
1479 GElf_Shdr *shdr = gelf_getshdr (sec->outscn, &shdr_mem); local
1587 GElf_Shdr *shdr = gelf_getshdr (unstripped_symtab, &shdr_mem); local
1777 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
[all...]
H A Delflint.c105 GElf_Shdr *shdr, int idx);
322 GElf_Shdr *shdr; local
324 shdr = gelf_getshdr (elf_getscn (ebl->elf, idx), &shdr_mem);
326 return elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
443 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem); local
444 if (shdr != NULL)
447 if (shdr->sh_size == 0)
451 shnum = shdr->sh_size;
460 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem); local
461 if (shdr !
526 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
563 check_symtab(Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) argument
986 is_rel_dyn(Ebl *ebl, const GElf_Ehdr *ehdr, int idx, const GElf_Shdr *shdr, bool is_rela) argument
1148 check_reloc_shdr(Ebl *ebl, const GElf_Ehdr *ehdr, const GElf_Shdr *shdr, int idx, int reltype, GElf_Shdr **destshdrp, GElf_Shdr *destshdr_memp, struct loaded_segment **loadedp) argument
1390 check_rela(Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) argument
1440 check_rel(Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) argument
1494 check_dynamic(Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) argument
1830 check_symtab_shndx(Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) argument
1911 check_sysv_hash(Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, int idx, GElf_Shdr *symshdr) argument
1952 check_sysv_hash64(Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, int idx, GElf_Shdr *symshdr) argument
1993 check_gnu_hash(Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, int idx, GElf_Shdr *symshdr) argument
2135 check_hash(int tag, Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) argument
2336 check_null(Ebl *ebl, GElf_Shdr *shdr, int idx) argument
2356 check_group(Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) argument
2556 GElf_Shdr *shdr = NULL; local
2607 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, shndx), &shdr_mem); local
2654 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
2782 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
2805 check_verneed(Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) argument
2934 check_verdef(Ebl *ebl, GElf_Shdr *shdr, int idx) argument
3113 check_attributes(Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) argument
3376 GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem); local
3997 check_note_section(Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) argument
4095 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
[all...]
H A Dfindtextrel.c267 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
269 if (shdr == NULL)
277 if (shdr->sh_type == SHT_DYNAMIC)
281 for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize;
301 else if (shdr->sh_type == SHT_SYMTAB)
390 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
392 if (shdr == NULL)
401 if ((shdr->sh_type == SHT_REL || shdr
526 GElf_Shdr *shdr = gelf_getshdr (symscn, &shdr_mem); local
[all...]
H A Dstrip.c391 GElf_Shdr shdr; member in struct:shdr_info
396 Elf32_Word old_sh_link; /* Original value of shdr.sh_link. */
573 if (gelf_getshdr (scn, &shdr_info[cnt].shdr) == NULL)
578 shdr_info[cnt].shdr.sh_name);
588 /* Remember the shdr.sh_link value. */
589 shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link;
595 || (shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) == 0)
596 shdr_info[cnt].shdr.sh_offset = 0;
600 if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX))
602 assert (shdr_info[shdr_info[cnt].shdr
1301 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
1565 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
[all...]
/external/elfutils/libdwfl/
H A Ddwfl_report_elf.c90 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
91 if (unlikely (shdr == NULL))
94 if (shdr->sh_flags & SHF_ALLOC)
96 const GElf_Xword align = shdr->sh_addralign ?: 1;
98 if (shdr->sh_addr == 0
104 shdr->sh_addr = next;
108 start = base = shdr->sh_addr;
145 end = shdr->sh_addr + shdr->sh_size;
146 if (likely (shdr
[all...]
H A Dderelocate.c109 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
110 if (shdr == NULL)
113 if ((shdr->sh_flags & SHF_ALLOC) && shdr->sh_addr == 0)
118 &shdr->sh_addr) != DWFL_E_NOERROR)
120 shdr = gelf_getshdr (scn, &shdr_mem);
121 if (unlikely (shdr == NULL))
125 if (shdr->sh_flags & SHF_ALLOC)
128 shdr->sh_name);
136 newref->start = shdr
200 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); local
[all...]
/external/elfutils/backends/
H A Dalpha_symbol.c84 const GElf_Shdr *shdr,
87 if ((shdr->sh_flags
89 && shdr->sh_addr != 0)
117 return pltgot == shdr->sh_addr;
82 alpha_check_special_section(Ebl *ebl, int ndx __attribute__ ((unused)), const GElf_Shdr *shdr, const char *sname __attribute__ ((unused))) argument
/external/valgrind/main/VEX/switchback/
H A Dlinker.c397 Elf_Shdr* shdr = (Elf_Shdr*)(ehdrC + ehdr->e_shoff);
398 char* sh_strtab = ehdrC + shdr[ehdr->e_shstrndx].sh_offset;
403 if (shdr[i].sh_type == sh_type
408 && 0 != memcmp(".stabstr", sh_strtab + shdr[i].sh_name, 8)
410 ptr = ehdrC + shdr[i].sh_offset;
514 Elf_Shdr* shdr, int shnum,
520 Elf_Rel* rtab = (Elf_Rel*) (ehdrC + shdr[shnum].sh_offset);
521 int nent = shdr[shnum].sh_size / sizeof(Elf_Rel);
522 int target_shndx = shdr[shnum].sh_info;
523 int symtab_shndx = shdr[shnu
[all...]

Completed in 266 milliseconds

1234