/external/elfutils/src/libelf/ |
D | elf_getdata.c | 113 convert_data (Elf_Scn *scn, int version __attribute__ ((unused)), int eclass, in convert_data() argument 120 if (((((size_t) (char *) scn->rawdata_base)) & (align - 1)) == 0) in convert_data() 122 scn->data_base = scn->rawdata_base; in convert_data() 125 scn->data_base = (char *) malloc (size); in convert_data() 126 if (scn->data_base == NULL) in convert_data() 133 memcpy (scn->data_base, scn->rawdata_base, size); in convert_data() 140 scn->data_base = (char *) malloc (size); in convert_data() 141 if (scn->data_base == NULL) in convert_data() 154 fp (scn->data_base, scn->rawdata_base, size, 0); in convert_data() 157 scn->data_list.data.d.d_buf = scn->data_base; in convert_data() [all …]
|
D | elf_newdata.c | 41 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() 67 if (scn->data_read && scn->data_list_rear == NULL) in elf_newdata() 71 result = &scn->data_list; in elf_newdata() 86 if (scn->data_list_rear == NULL) in elf_newdata() [all …]
|
D | elf32_getshdr.c | 49 load_shdr_wrlock (Elf_Scn *scn) in ElfW2() 54 Elf *elf = scn->elf; in ElfW2() 58 result = scn->shdr.ELFW(e,LIBELFBITS); in ElfW2() 207 result = scn->shdr.ELFW(e,LIBELFBITS); in ElfW2() 215 scn_valid (Elf_Scn *scn) in scn_valid() argument 217 if (scn == NULL) in scn_valid() 220 if (unlikely (scn->elf->state.elf.ehdr == NULL)) in scn_valid() 226 if (unlikely (scn->elf->class != ELFW(ELFCLASS,LIBELFBITS))) in scn_valid() 236 __elfw2(LIBELFBITS,getshdr_rdlock) (scn) 237 Elf_Scn *scn; [all …]
|
D | elf_rawdata.c | 40 elf_rawdata (scn, data) in elf_rawdata() argument 41 Elf_Scn *scn; in elf_rawdata() 44 if (scn == NULL || scn->elf->kind != ELF_K_ELF) 56 || (scn->data_read != 0 && (scn->flags & ELF_F_FILEDATA) == 0)) 65 if (scn->data_read == 0) 70 if (__libelf_set_rawdata (scn) != 0) 76 return &scn->rawdata.d;
|
D | gelf_getshdr.c | 41 gelf_getshdr (scn, dst) in gelf_getshdr() argument 42 Elf_Scn *scn; in gelf_getshdr() 47 if (scn == NULL) 56 rwlock_rdlock (scn->elf->lock); 58 if (scn->elf->class == ELFCLASS32) 62 = scn->shdr.e32 ?: __elf32_getshdr_rdlock (scn); 88 = scn->shdr.e64 ?: __elf64_getshdr_rdlock (scn); 101 rwlock_unlock (scn->elf->lock);
|
D | elf32_updatefile.c | 229 Elf_Scn *scn = scns[cnt]; in __elfw2() local 232 && (scn->shdr_flags & ELF_F_MALLOCED) == 0 in __elfw2() 233 && scn->shdr.ELFW(e,LIBELFBITS) != &shdr_dest[scn->index]) in __elfw2() 236 < (char *) scn->shdr.ELFW(e,LIBELFBITS)); in __elfw2() 237 assert ((char *) scn->shdr.ELFW(e,LIBELFBITS) in __elfw2() 242 scn->shdr.ELFW(e,LIBELFBITS) in __elfw2() 243 = memcpy (p, scn->shdr.ELFW(e,LIBELFBITS), in __elfw2() 254 <= (char *) scn->data_list.data.d.d_buf) in __elfw2() 255 && ((char *) scn->data_list.data.d.d_buf in __elfw2() 259 + scn->shdr.ELFW(e,LIBELFBITS)->sh_offset) in __elfw2() [all …]
|
D | gelf_update_shdr.c | 41 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()
|
D | elf_nextscn.c | 42 elf_nextscn (elf, scn) in elf_nextscn() argument 44 Elf_Scn *scn; 53 if (scn == NULL) 71 Elf_ScnList *list = scn->list; 73 if (scn + 1 < &list->data[list->cnt]) 74 result = scn + 1; 75 else if (scn + 1 == &list->data[list->max]
|
D | elf_flagscn.c | 41 elf_flagscn (scn, cmd, flags) in elf_flagscn() argument 42 Elf_Scn *scn; in elf_flagscn() 48 if (scn == NULL) 51 if (unlikely (scn->elf->kind != ELF_K_ELF)) 58 result = (scn->flags |= (flags & ELF_F_DIRTY)); 60 result = (scn->flags &= ~(flags & ELF_F_DIRTY));
|
D | elf_flagshdr.c | 41 elf_flagshdr (scn, cmd, flags) in elf_flagshdr() argument 42 Elf_Scn *scn; in elf_flagshdr() 48 if (scn == NULL) 51 if (unlikely (scn->elf->kind != ELF_K_ELF)) 58 result = (scn->shdr_flags |= (flags & ELF_F_DIRTY)); 60 result = (scn->shdr_flags &= ~(flags & ELF_F_DIRTY));
|
D | elf32_checksum.c | 58 Elf_Scn *scn; variable 91 scn = NULL; 92 while ((scn = INTUSE(elf_nextscn) (elf, scn)) != NULL) 99 shdr = INTUSE(gelf_getshdr) (scn, &shdr_mem); 124 data = INTUSE(elf_rawdata) (scn, NULL); 136 while ((data = INTUSE(elf_getdata) (scn, data)) != NULL)
|
D | gelf_update_auxv.c | 46 Elf_Scn *scn; local 65 scn = data_scn->s; 66 rwlock_wrlock (scn->elf->lock); 68 if (scn->elf->class == ELFCLASS32) 108 scn->flags |= ELF_F_DIRTY; 111 rwlock_unlock (scn->elf->lock);
|
D | gelf_update_rel.c | 44 Elf_Scn *scn; in gelf_update_rel() local 57 scn = data_scn->s; in gelf_update_rel() 58 rwlock_wrlock (scn->elf->lock); in gelf_update_rel() 60 if (scn->elf->class == ELFCLASS32) in gelf_update_rel() 102 scn->flags |= ELF_F_DIRTY; in gelf_update_rel() 105 rwlock_unlock (scn->elf->lock); in gelf_update_rel()
|
D | gelf_update_dyn.c | 47 Elf_Scn *scn; local 60 scn = data_scn->s; 61 rwlock_wrlock (scn->elf->lock); 63 if (scn->elf->class == ELFCLASS32) 104 scn->flags |= ELF_F_DIRTY; 107 rwlock_unlock (scn->elf->lock);
|
D | gelf_update_rela.c | 44 Elf_Scn *scn; in gelf_update_rela() local 57 scn = data_scn->s; in gelf_update_rela() 58 rwlock_wrlock (scn->elf->lock); in gelf_update_rela() 60 if (scn->elf->class == ELFCLASS32) in gelf_update_rela() 105 scn->flags |= ELF_F_DIRTY; in gelf_update_rela() 108 rwlock_unlock (scn->elf->lock); in gelf_update_rela()
|
D | gelf_update_sym.c | 48 Elf_Scn *scn; local 61 scn = data_scn->s; 62 rwlock_wrlock (scn->elf->lock); 64 if (scn->elf->class == ELFCLASS32) 113 scn->flags |= ELF_F_DIRTY; 116 rwlock_unlock (scn->elf->lock);
|
D | gelf_update_syminfo.c | 48 Elf_Scn *scn; local 65 scn = data_scn->s; 66 rwlock_wrlock (scn->elf->lock); 80 scn->flags |= ELF_F_DIRTY; 83 rwlock_unlock (scn->elf->lock);
|
D | elf32_updatenull.c | 198 Elf_Scn *scn = &list->data[cnt]; in __elfw2() local 199 ElfW2(LIBELFBITS,Shdr) *shdr = scn->shdr.ELFW(e,LIBELFBITS); in __elfw2() 251 scn->shdr_flags); in __elfw2() 253 if (scn->data_read == 0 in __elfw2() 254 && __libelf_set_rawdata_wrlock (scn) != 0) in __elfw2() 261 Elf_Data_List *dl = &scn->data_list; in __elfw2() 266 if (dl == &scn->data_list && data->d_buf == NULL in __elfw2() 267 && scn->rawdata.d.d_buf != NULL) in __elfw2() 268 data = &scn->rawdata.d; in __elfw2() 316 offset += scn->rawdata.d.d_size; in __elfw2() [all …]
|
D | gelf_update_symshndx.c | 52 Elf_Scn *scn; local 66 scn = symdata_scn->s; 69 rwlock_wrlock (scn->elf->lock); 90 if (scn->elf->class == ELFCLASS32) 143 scn->flags |= ELF_F_DIRTY; 146 rwlock_unlock (scn->elf->lock);
|
/external/elfutils/src/libasm/ |
D | asm_end.c | 90 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/src/libdwfl/ |
D | derelocate.c | 36 Elf_Scn *scn; member 47 Elf_Scn *scn; member 87 Elf_Scn *scn = NULL; in cache_sections() local 88 while ((scn = elf_nextscn (mod->main.elf, scn)) != NULL) in cache_sections() 91 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in cache_sections() 100 elf_ndxscn (scn), in cache_sections() 103 shdr = gelf_getshdr (scn, &shdr_mem); in cache_sections() 116 newref->scn = scn; in cache_sections() 131 if (shdr->sh_info < elf_ndxscn (scn)) in cache_sections() 137 if (sec->scn == tscn) in cache_sections() [all …]
|
/external/elfutils/src/tests/ |
D | update4.c | 42 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 …]
|
D | asm-tst6.c | 62 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()
|
/external/ltrace/ |
D | ltrace-elf.c | 116 elf_loaddata(Elf_Scn *scn, GElf_Shdr *shdr) in elf_loaddata() argument 118 Elf_Data *data = elf_getdata(scn, NULL); in elf_loaddata() 119 if (data == NULL || elf_getdata(scn, data) != NULL in elf_loaddata() 132 Elf_Scn *scn; in elf_get_section_if() local 135 scn = elf_getscn(lte->elf, i); in elf_get_section_if() 136 if (scn == NULL || gelf_getshdr(scn, &shdr) == NULL) { in elf_get_section_if() 140 if (predicate(scn, &shdr, data)) { in elf_get_section_if() 141 *tgt_sec = scn; in elf_get_section_if() 152 inside_p(Elf_Scn *scn, GElf_Shdr *shdr, void *data) in inside_p() argument 168 type_p(Elf_Scn *scn, GElf_Shdr *shdr, void *data) in type_p() argument [all …]
|
/external/elfutils/src/libdwelf/ |
D | dwelf_elf_gnu_debuglink.c | 42 Elf_Scn *scn = NULL; in dwelf_elf_gnu_debuglink() local 43 while ((scn = elf_nextscn (elf, scn)) != NULL) in dwelf_elf_gnu_debuglink() 46 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); in dwelf_elf_gnu_debuglink() 58 if (scn == NULL) in dwelf_elf_gnu_debuglink() 62 Elf_Data *rawdata = elf_rawdata (scn, NULL); in dwelf_elf_gnu_debuglink()
|