Home
last modified time | relevance | path

Searched refs:scn (Results 1 – 25 of 240) sorted by relevance

12345678910

/external/elfutils/libelf/
Delf_getdata.c139 convert_data (Elf_Scn *scn, int version __attribute__ ((unused)), int eclass, in convert_data() argument
146 if (((((size_t) (char *) scn->rawdata_base)) & (align - 1)) == 0) in convert_data()
148 scn->data_base = scn->rawdata_base; in convert_data()
151 scn->data_base = (char *) malloc (size); in convert_data()
152 if (scn->data_base == NULL) in convert_data()
159 memcpy (scn->data_base, scn->rawdata_base, size); in convert_data()
166 scn->data_base = (char *) malloc (size); in convert_data()
167 if (scn->data_base == NULL) in convert_data()
177 ((((size_t) (char *) scn->rawdata_base)) & (align - 1)) == 0) in convert_data()
178 rawdata_source = scn->rawdata_base; in convert_data()
[all …]
Delf_newdata.c41 elf_newdata (Elf_Scn *scn) in elf_newdata() argument
45 if (scn == NULL) in elf_newdata()
48 if (unlikely (scn->index == 0)) in elf_newdata()
55 if (scn->elf->class == ELFCLASS32 in elf_newdata()
58 ? scn->elf->state.elf32.ehdr == NULL in elf_newdata()
59 : scn->elf->state.elf64.ehdr == NULL) in elf_newdata()
65 rwlock_wrlock (scn->elf->lock); in elf_newdata()
81 if (scn->data_read in elf_newdata()
82 && scn->rawdata_base != NULL in elf_newdata()
83 && scn->data_list_rear == NULL) in elf_newdata()
[all …]
Delf_compress.c72 __libelf_compress (Elf_Scn *scn, size_t hsize, int ei_data, in __libelf_compress() argument
82 Elf_Data *data = elf_getdata (scn, NULL); in __libelf_compress()
90 Elf_Data *next_data = elf_getdata (scn, data); in __libelf_compress()
143 if (gelf_xlatetof (scn->elf, &cdata, data, ei_data) == NULL) in __libelf_compress()
156 next_data = elf_getdata (scn, data); in __libelf_compress()
258 __libelf_decompress_elf (Elf_Scn *scn, size_t *size_out, size_t *addralign) in __libelf_decompress_elf() argument
261 if (gelf_getchdr (scn, &chdr) == NULL) in __libelf_decompress_elf()
282 Elf_Data *data = elf_getdata (scn, NULL); in __libelf_decompress_elf()
286 int elfclass = scn->elf->class; in __libelf_decompress_elf()
299 __libelf_reset_rawdata (Elf_Scn *scn, void *buf, size_t size, size_t align, in __libelf_reset_rawdata() argument
[all …]
Delf_compress_gnu.c38 elf_compress_gnu (Elf_Scn *scn, int inflate, unsigned int flags) in elf_compress_gnu() argument
40 if (scn == NULL) in elf_compress_gnu()
51 Elf *elf = scn->elf; in elf_compress_gnu()
64 Elf32_Shdr *shdr = elf32_getshdr (scn); in elf_compress_gnu()
74 Elf64_Shdr *shdr = elf64_getshdr (scn); in elf_compress_gnu()
102 void *out_buf = __libelf_compress (scn, hsize, elfdata, in elf_compress_gnu()
123 Elf32_Shdr *shdr = elf32_getshdr (scn); in elf_compress_gnu()
128 Elf64_Shdr *shdr = elf64_getshdr (scn); in elf_compress_gnu()
132 __libelf_reset_rawdata (scn, out_buf, new_size, 1, ELF_T_BYTE); in elf_compress_gnu()
138 scn->zdata_base = NULL; in elf_compress_gnu()
[all …]
Delf32_getshdr.c49 load_shdr_wrlock (Elf_Scn *scn) in ElfW2()
54 Elf *elf = scn->elf; in ElfW2()
58 result = scn->shdr.ELFW(e,LIBELFBITS); in ElfW2()
220 result = scn->shdr.ELFW(e,LIBELFBITS); in ElfW2()
228 scn_valid (Elf_Scn *scn) in scn_valid() argument
230 if (scn == NULL) in scn_valid()
233 if (unlikely (scn->elf->state.elf.ehdr == NULL)) in scn_valid()
239 if (unlikely (scn->elf->class != ELFW(ELFCLASS,LIBELFBITS))) in scn_valid()
250 __elfw2(LIBELFBITS,getshdr_rdlock) (Elf_Scn *scn) in ElfW2()
254 if (!scn_valid (scn)) in ElfW2()
[all …]
Delf32_updatefile.c257 Elf_Scn *scn = scns[cnt]; in __elfw2() local
260 && (scn->shdr_flags & ELF_F_MALLOCED) == 0 in __elfw2()
261 && scn->shdr.ELFW(e,LIBELFBITS) != &shdr_dest[scn->index]) in __elfw2()
264 < (char *) scn->shdr.ELFW(e,LIBELFBITS)); in __elfw2()
265 assert ((char *) scn->shdr.ELFW(e,LIBELFBITS) in __elfw2()
275 scn->shdr.ELFW(e,LIBELFBITS) in __elfw2()
276 = memcpy (p, scn->shdr.ELFW(e,LIBELFBITS), in __elfw2()
287 <= (char *) scn->data_list.data.d.d_buf) in __elfw2()
288 && ((char *) scn->data_list.data.d.d_buf in __elfw2()
292 + scn->shdr.ELFW(e,LIBELFBITS)->sh_offset) in __elfw2()
[all …]
Delf_rawdata.c40 elf_rawdata (Elf_Scn *scn, Elf_Data *data) in elf_rawdata() argument
42 if (scn == NULL || scn->elf->kind != ELF_K_ELF) in elf_rawdata()
54 || (scn->data_read != 0 && (scn->flags & ELF_F_FILEDATA) == 0)) in elf_rawdata()
63 if (scn->data_read == 0) in elf_rawdata()
68 if (__libelf_set_rawdata (scn) != 0) in elf_rawdata()
74 return &scn->rawdata.d; in elf_rawdata()
Dgelf_getshdr.c41 gelf_getshdr (Elf_Scn *scn, GElf_Shdr *dst) in gelf_getshdr() argument
45 if (scn == NULL) in gelf_getshdr()
54 rwlock_rdlock (scn->elf->lock); in gelf_getshdr()
56 if (scn->elf->class == ELFCLASS32) in gelf_getshdr()
60 = scn->shdr.e32 ?: __elf32_getshdr_rdlock (scn); in gelf_getshdr()
86 = scn->shdr.e64 ?: __elf64_getshdr_rdlock (scn); in gelf_getshdr()
99 rwlock_unlock (scn->elf->lock); in gelf_getshdr()
Delf_end.c146 Elf_Scn *scn = &list->data[cnt]; in elf_end() local
149 if ((scn->shdr_flags & ELF_F_MALLOCED) != 0) in elf_end()
151 free (scn->shdr.e32); in elf_end()
156 if (scn->zdata_base != scn->rawdata_base) in elf_end()
157 free (scn->zdata_base); in elf_end()
163 if (scn->data_base != scn->rawdata_base) in elf_end()
164 free (scn->data_base); in elf_end()
169 || scn->rawdata_base == scn->zdata_base) in elf_end()
170 free (scn->rawdata_base); in elf_end()
175 runp = scn->data_list.next; in elf_end()
Dgelf_update_shdr.c41 gelf_update_shdr (Elf_Scn *scn, GElf_Shdr *src) in gelf_update_shdr() argument
46 if (scn == NULL || src == NULL) in gelf_update_shdr()
49 elf = scn->elf; in gelf_update_shdr()
55 = scn->shdr.e32 ?: __elf32_getshdr_wrlock (scn); in gelf_update_shdr()
90 = scn->shdr.e64 ?: __elf64_getshdr_wrlock (scn); in gelf_update_shdr()
103 scn->shdr_flags |= ELF_F_DIRTY; in gelf_update_shdr()
Delf32_checksum.c57 Elf_Scn *scn; in elfw2() local
90 scn = NULL; in elfw2()
91 while ((scn = INTUSE(elf_nextscn) (elf, scn)) != NULL) in elfw2()
98 shdr = INTUSE(gelf_getshdr) (scn, &shdr_mem); in elfw2()
123 data = INTUSE(elf_rawdata) (scn, NULL); in elfw2()
135 while ((data = INTUSE(elf_getdata) (scn, data)) != NULL) in elfw2()
Delf_nextscn.c42 elf_nextscn (Elf *elf, Elf_Scn *scn) in elf_nextscn() argument
51 if (scn == NULL) in elf_nextscn()
69 Elf_ScnList *list = scn->list; in elf_nextscn()
71 if (scn + 1 < &list->data[list->cnt]) in elf_nextscn()
72 result = scn + 1; in elf_nextscn()
73 else if (scn + 1 == &list->data[list->max] in elf_nextscn()
Delf32_updatenull.c210 Elf_Scn *scn = &list->data[cnt]; in __elfw2() local
211 ElfW2(LIBELFBITS,Shdr) *shdr = scn->shdr.ELFW(e,LIBELFBITS); in __elfw2()
268 scn->shdr_flags); in __elfw2()
270 if (scn->data_read == 0 in __elfw2()
271 && __libelf_set_rawdata_wrlock (scn) != 0) in __elfw2()
278 Elf_Data_List *dl = &scn->data_list; in __elfw2()
283 if (dl == &scn->data_list && data->d_buf == NULL in __elfw2()
284 && scn->rawdata.d.d_buf != NULL) in __elfw2()
285 data = &scn->rawdata.d; in __elfw2()
333 offset += scn->rawdata.d.d_size; in __elfw2()
[all …]
/external/elfutils/libasm/
Dasm_end.c90 Elf_Scn *scn = elf_getscn (ctx->out.elf, asmscn->data.main.scnndx); in binary_end()
92 Elf_Scn *scn = asmscn->data.main.scn; in binary_end() local
113 Elf_Data *newdata = elf_newdata (scn); in binary_end()
200 syment.st_value = sym->scn->offset + sym->offset; in binary_end()
209 Elf_Scn *scn = (sym->scn->subsection_id == 0 in binary_end() local
210 ? sym->scn->data.main.scn in binary_end()
211 : sym->scn->data.up->data.main.scn); in binary_end()
214 if (unlikely (scn == ASM_ABS_SCN)) in binary_end()
216 else if (unlikely (scn == ASM_COM_SCN)) in binary_end()
218 else if (unlikely ((ndx = elf_ndxscn (scn)) >= SHN_LORESERVE)) in binary_end()
[all …]
/external/elfutils/tests/
Delfputzdata.c73 Elf_Scn *scn = NULL; in main() local
74 while ((scn = elf_nextscn (elf, scn)) != NULL) in main()
76 size_t idx = elf_ndxscn (scn); in main()
78 GElf_Shdr *shdr = gelf_getshdr (scn, &mem); in main()
95 Elf_Data *d = elf_getdata (scn, NULL); in main()
120 int res = elf_compress_gnu (scn, 1, 0); in main()
124 res = elf_compress_gnu (scn, 1, ELF_CHF_FORCE); in main()
136 int res = elf_compress (scn, ELFCOMPRESS_ZLIB, 0); in main()
140 res = elf_compress (scn, ELFCOMPRESS_ZLIB, ELF_CHF_FORCE); in main()
151 GElf_Shdr *newshdr = gelf_getshdr (scn, &newmem); in main()
[all …]
Delfstrtab.c107 add_string (Elf_Scn *scn, char *str) in add_string() argument
112 Elf_Data *data = elf_newdata (scn); in add_string()
174 Elf_Scn *scn = elf_newscn (elf); in check_elf() local
175 if (scn == NULL) in check_elf()
182 add_string (scn, ""); in check_elf()
185 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in check_elf()
199 shdr->sh_name = add_string (scn, ".strings"); in check_elf()
203 int ndx = elf_ndxscn (scn); in check_elf()
216 orig_str1_off = add_string (scn, orig_str1); in check_elf()
218 orig_str2_off = add_string (scn, orig_str2); in check_elf()
[all …]
Dupdate4.c42 Elf_Scn *scn; in main() local
116 scn = elf_newscn (elf); in main()
117 if (scn == NULL) in main()
122 shdr = elf32_getshdr (scn); in main()
138 data = elf_newdata (scn); in main()
152 scn = elf_newscn (elf); in main()
153 if (scn == NULL) in main()
158 shdr = elf32_getshdr (scn); in main()
174 data = elf_newdata (scn); in main()
188 scn = elf_newscn (elf); in main()
[all …]
Delfgetzdata.c68 Elf_Scn *scn = NULL; in main() local
69 while ((scn = elf_nextscn (elf, scn)) != NULL) in main()
71 size_t idx = elf_ndxscn (scn); in main()
73 GElf_Shdr *shdr = gelf_getshdr (scn, &mem); in main()
78 if (elf_compress (scn, 0, 0) < 0) in main()
84 Elf_Data *d = elf_getdata (scn, NULL); in main()
93 if (elf_compress_gnu (scn, 0, 0) < 0) in main()
99 Elf_Data *d = elf_getdata (scn, NULL); in main()
Dnewdata.c42 Elf_Scn *scn = elf_getscn (elf, 1); in add_section_data() local
43 if (scn == NULL) in add_section_data()
49 Elf_Data *data = elf_newdata (scn); in add_section_data()
111 Elf_Scn *scn = elf_newscn (elf); in create_elf() local
112 if (scn == NULL) in create_elf()
119 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in create_elf()
136 if (gelf_update_shdr (scn, shdr) == 0) in create_elf()
172 Elf_Scn *scn = elf_getscn (elf, 1); in check_section_size() local
173 if (scn == NULL) in check_section_size()
180 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in check_section_size()
[all …]
Dasm-tst6.c62 AsmScn_t *scn; in main() local
74 scn = asm_newscn_ingrp (ctx, ".data", SHT_PROGBITS, in main()
76 if (scn == NULL) in main()
86 sym = asm_newsym (scn, buf, sizeof (uint32_t), STT_OBJECT, in main()
96 if (asm_adduint32 (scn, cnt) != 0) in main()
114 scn = asm_newscn_ingrp (ctx, ".stab", SHT_PROGBITS, 0, grp); in main()
115 if (scn == NULL) in main()
124 if (asm_adduint32 (scn, cnt) != 0) in main()
Delfgetchdr.c65 Elf_Scn *scn = NULL; in main() local
66 while ((scn = elf_nextscn (elf, scn)) != NULL) in main()
68 int idx = elf_ndxscn (scn); in main()
70 if (gelf_getshdr (scn, &shdr) == NULL) in main()
80 if (gelf_getchdr (scn, &chdr) == NULL) in main()
105 if ((size = dwelf_scn_gnu_compressed_size (scn)) == -1) in main()
/external/elfutils/libdwfl/
Dderelocate.c36 Elf_Scn *scn; member
47 Elf_Scn *scn; member
88 Elf_Scn *scn = NULL; in cache_sections() local
89 while ((scn = elf_nextscn (mod->main.elf, scn)) != NULL) in cache_sections()
92 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in cache_sections()
101 elf_ndxscn (scn), in cache_sections()
104 shdr = gelf_getshdr (scn, &shdr_mem); in cache_sections()
125 newref->scn = scn; in cache_sections()
140 if (shdr->sh_info < elf_ndxscn (scn)) in cache_sections()
146 if (sec->scn == tscn) in cache_sections()
[all …]
Drelocate.c121 Elf_Scn *scn = NULL; in relocate_getsym() local
122 while ((scn = elf_nextscn (relocated, scn)) != NULL) in relocate_getsym()
124 GElf_Shdr shdr_mem, *shdr = gelf_getshdr (scn, &shdr_mem); in relocate_getsym()
131 if (elf_compress (scn, 0, 0) < 0) in relocate_getsym()
140 cache->symdata = elf_getdata (scn, NULL); in relocate_getsym()
146 cache->symxndxdata = elf_getdata (scn, NULL); in relocate_getsym()
216 Elf_Scn *scn = elf_getscn (symtab->symelf, symtab->strtabndx); in resolve_symbol() local
217 if (scn == NULL) in resolve_symbol()
221 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in resolve_symbol()
236 elf_compress_gnu (scn, 0, 0); in resolve_symbol()
[all …]
/external/elfutils/src/
Delfcompress.c200 compress_section (Elf_Scn *scn, size_t orig_size, const char *name, in compress_section() argument
207 res = elf_compress_gnu (scn, compress ? 1 : 0, flags); in compress_section()
209 res = elf_compress (scn, compress ? ELFCOMPRESS_ZLIB : 0, flags); in compress_section()
232 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in compress_section()
442 Elf_Scn *scn = NULL; in process_file() local
443 while ((scn = elf_nextscn (elf, scn)) != NULL) in process_file()
445 size_t ndx = elf_ndxscn (scn); in process_file()
454 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in process_file()
645 scn = NULL; in process_file()
646 while ((scn = elf_nextscn (elf, scn)) != NULL) in process_file()
[all …]
/external/elfutils/libdw/
Ddwarf_begin_elf.c68 check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp) in check_section() argument
74 shdr = gelf_getshdr (scn, &shdr_mem); in check_section()
135 elf_compress_gnu (scn, 0, 0); in check_section()
139 if (elf_compress (scn, 0, 0) < 0) in check_section()
157 Elf_Data *data = elf_getdata (scn, NULL); in check_section()
219 Elf_Scn *scn = NULL; in global_read() local
221 while (result != NULL && (scn = elf_nextscn (elf, scn)) != NULL) in global_read()
222 result = check_section (result, ehdr, scn, false); in global_read()
267 Elf_Scn *scn = elf_getscn (elf, scnidx[cnt]); in scngrp_read() local
268 if (scn == NULL) in scngrp_read()
[all …]

12345678910