Home
last modified time | relevance | path

Searched refs:scns (Results 1 – 17 of 17) sorted by relevance

/external/elfutils/libelf/
Delf_getphdrnum.c57 const Elf_ScnList *const scns = (elf->class == ELFCLASS32 in __elf_getphdrnum_rdlock() local
58 ? &elf->state.elf32.scns in __elf_getphdrnum_rdlock()
59 : &elf->state.elf64.scns); in __elf_getphdrnum_rdlock()
66 if (likely (scns->cnt > 0 in __elf_getphdrnum_rdlock()
67 && elf->state.elf32.scns.data[0].shdr.e32 != NULL)) in __elf_getphdrnum_rdlock()
68 *dst = scns->data[0].shdr.e32->sh_info; in __elf_getphdrnum_rdlock()
72 if (likely (scns->cnt > 0 in __elf_getphdrnum_rdlock()
73 && elf->state.elf64.scns.data[0].shdr.e64 != NULL)) in __elf_getphdrnum_rdlock()
74 *dst = scns->data[0].shdr.e64->sh_info; in __elf_getphdrnum_rdlock()
Delf_clone.c58 elf->state.elf32.scns.max * sizeof (Elf_Scn)); in elf_clone()
68 assert (offsetof (struct Elf, state.elf32.scns) in elf_clone()
69 == offsetof (struct Elf, state.elf64.scns)); in elf_clone()
70 retval->state.elf.scns_last = &retval->state.elf32.scns; in elf_clone()
71 retval->state.elf32.scns.max = elf->state.elf32.scns.max; in elf_clone()
Delf_begin.c320 assert (offsetof (struct Elf, state.elf32.scns) in file_read_elf()
321 == offsetof (struct Elf, state.elf64.scns)); in file_read_elf()
322 elf->state.elf32.scns.cnt = scncnt; in file_read_elf()
323 elf->state.elf32.scns.max = scnmax; in file_read_elf()
393 elf->state.elf32.scns.data[cnt].index = cnt; in file_read_elf()
394 elf->state.elf32.scns.data[cnt].elf = elf; in file_read_elf()
395 elf->state.elf32.scns.data[cnt].shdr.e32 = in file_read_elf()
400 elf->state.elf32.scns.data[cnt].rawdata_base = in file_read_elf()
401 elf->state.elf32.scns.data[cnt].data_base = in file_read_elf()
404 elf->state.elf32.scns.data[cnt].list = &elf->state.elf32.scns; in file_read_elf()
[all …]
Delf_end.c132 || (offsetof (struct Elf, state.elf32.scns) in elf_end()
133 == offsetof (struct Elf, state.elf64.scns)) in elf_end()
134 ? &elf->state.elf32.scns in elf_end()
135 : &elf->state.elf64.scns); in elf_end()
191 || (offsetof (struct Elf, state.elf32.scns) in elf_end()
192 == offsetof (struct Elf, state.elf64.scns)) in elf_end()
193 ? &elf->state.elf32.scns in elf_end()
194 : &elf->state.elf64.scns)) in elf_end()
Delf32_updatefile.c91 sort_sections (Elf_Scn **scns, Elf_ScnList *list) in sort_sections() argument
93 Elf_Scn **scnp = scns; in sort_sections()
99 qsort (scns, scnp - scns, sizeof (*scns), compare_sections); in sort_sections()
220 Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns; in __elfw2()
221 Elf_Scn **scns = (Elf_Scn **) malloc (shnum * sizeof (Elf_Scn *)); in __elfw2() local
222 if (unlikely (scns == NULL)) in __elfw2()
236 sort_sections (scns, list); in __elfw2()
242 Elf_Scn *scn = scns[cnt]; in __elfw2()
257 free (scns); in __elfw2()
284 free (scns); in __elfw2()
[all …]
Delf_newscn.c58 assert (offsetof (Elf, state.elf32.scns) in elf_newscn()
59 == offsetof (Elf, state.elf64.scns)); in elf_newscn()
71 || (offsetof (Elf, state.elf32.scns) in elf_newscn()
72 == offsetof (Elf, state.elf64.scns)) in elf_newscn()
73 ? &elf->state.elf32.scns : &elf->state.elf64.scns))) in elf_newscn()
Delf_nextscn.c57 || (offsetof (Elf, state.elf32.scns) in elf_nextscn()
58 == offsetof (Elf, state.elf64.scns))) in elf_nextscn()
59 list = &elf->state.elf32.scns; in elf_nextscn()
61 list = &elf->state.elf64.scns; in elf_nextscn()
Delf_getshdrnum.c61 || (offsetof (Elf, state.elf32.scns) in __elf_getshdrnum_rdlock()
62 == offsetof (Elf, state.elf64.scns)) in __elf_getshdrnum_rdlock()
63 ? &elf->state.elf32.scns : &elf->state.elf64.scns))) in __elf_getshdrnum_rdlock()
Delf_getshdrstrndx.c93 if (unlikely (elf->state.elf32.scns.cnt == 0)) in elf_getshdrstrndx()
101 if (elf->state.elf32.scns.data[0].shdr.e32 != NULL) in elf_getshdrstrndx()
103 num = elf->state.elf32.scns.data[0].shdr.e32->sh_link; in elf_getshdrstrndx()
158 if (unlikely (elf->state.elf64.scns.cnt == 0)) in elf_getshdrstrndx()
166 if (elf->state.elf64.scns.data[0].shdr.e64 != NULL) in elf_getshdrstrndx()
168 num = elf->state.elf64.scns.data[0].shdr.e64->sh_link; in elf_getshdrstrndx()
Delf_getscn.c59 || (offsetof (struct Elf, state.elf32.scns) in elf_getscn()
60 == offsetof (struct Elf, state.elf64.scns)) in elf_getscn()
61 ? &elf->state.elf32.scns : &elf->state.elf64.scns); in elf_getscn()
Delf32_newphdr.c100 if (elf->state.ELFW(elf,LIBELFBITS).scns.cnt > 0) in ElfW2()
101 elf->state.ELFW(elf,LIBELFBITS).scns.data[0] in ElfW2()
125 Elf_Scn *scn0 = &elf->state.ELFW(elf,LIBELFBITS).scns.data[0]; in ElfW2()
149 if (elf->state.ELFW(elf,LIBELFBITS).scns.cnt == 0) in ElfW2()
151 assert (elf->state.ELFW(elf,LIBELFBITS).scns.max > 0); in ElfW2()
152 elf->state.ELFW(elf,LIBELFBITS).scns.cnt = 1; in ElfW2()
Delf_strptr.c91 || (offsetof (struct Elf, state.elf32.scns) in elf_strptr()
92 == offsetof (struct Elf, state.elf64.scns)) in elf_strptr()
93 ? &elf->state.elf32.scns : &elf->state.elf64.scns); in elf_strptr()
Delf32_getshdr.c157 elf->state.ELFW(elf,LIBELFBITS).scns.data[shdr[cnt].sh_link].shndx_index in ElfW2()
162 if (elf->state.ELFW(elf,LIBELFBITS).scns.data[cnt].shndx_index == 0) in ElfW2()
163 elf->state.ELFW(elf,LIBELFBITS).scns.data[cnt].shndx_index in ElfW2()
217 elf->state.ELFW(elf,LIBELFBITS).scns.data[cnt].shdr.ELFW(e,LIBELFBITS) in ElfW2()
Delf32_updatenull.c180 assert (elf->state.ELFW(elf,LIBELFBITS).scns.cnt > 0); in __elfw2()
186 Elf_Scn *scn0 = &elf->state.ELFW(elf,LIBELFBITS).scns.data[0]; in __elfw2()
193 list = &elf->state.ELFW(elf,LIBELFBITS).scns; in __elfw2()
Delf32_offscn.c57 Elf_ScnList *runp = &elf->state.ELFW(elf,LIBELFBITS).scns; in elfw2()
DlibelfP.h360 Elf_ScnList scns; member
384 Elf_ScnList scns; member
DChangeLog59 * elf32_updatefile.c (updatemmap): Free scns before returning
406 * elf32_updatefile.c (updatemmap): Free scns when out of memory.
579 * elf32_updatefile.c (updatefile): Always free shdr_data and scns
640 * elf32_updatefile.c (updatefile): Allocate shdr_data and scns