/external/elfutils/libelf/ |
D | elf32_newphdr.c | 40 #ifndef LIBELFBITS 41 # define LIBELFBITS 32 macro 45 ElfW2(LIBELFBITS,Phdr) * in ElfW2() argument 46 elfw2(LIBELFBITS,newphdr) (Elf *elf, size_t count) in ElfW2() 48 ElfW2(LIBELFBITS,Phdr) *result; in ElfW2() 59 if (unlikely ((ElfW2(LIBELFBITS,Word)) count != count)) in ElfW2() 68 elf->class = ELFW(ELFCLASS,LIBELFBITS); in ElfW2() 69 else if (unlikely (elf->class != ELFW(ELFCLASS,LIBELFBITS))) in ElfW2() 76 if (unlikely (elf->state.ELFW(elf,LIBELFBITS).ehdr == NULL)) in ElfW2() 87 if (elf->state.ELFW(elf,LIBELFBITS).phdr != NULL) in ElfW2() [all …]
|
D | gelf_fsize.c | 44 #define TYPE_SIZES(LIBELFBITS) \ argument 45 [ELF_T_ADDR] = ELFW2(LIBELFBITS, FSZ_ADDR), \ 46 [ELF_T_OFF] = ELFW2(LIBELFBITS, FSZ_OFF), \ 48 [ELF_T_HALF] = ELFW2(LIBELFBITS, FSZ_HALF), \ 49 [ELF_T_WORD] = ELFW2(LIBELFBITS, FSZ_WORD), \ 50 [ELF_T_SWORD] = ELFW2(LIBELFBITS, FSZ_SWORD), \ 51 [ELF_T_XWORD] = ELFW2(LIBELFBITS, FSZ_XWORD), \ 52 [ELF_T_SXWORD] = ELFW2(LIBELFBITS, FSZ_SXWORD), \ 53 [ELF_T_EHDR] = sizeof (ElfW2(LIBELFBITS, Ext_Ehdr)), \ 54 [ELF_T_SHDR] = sizeof (ElfW2(LIBELFBITS, Ext_Shdr)), \ [all …]
|
D | gelf_xlate.h | 32 FUNDAMENTAL (ADDR, Addr, LIBELFBITS); 33 FUNDAMENTAL (OFF, Off, LIBELFBITS); 34 FUNDAMENTAL (HALF, Half, LIBELFBITS); 35 FUNDAMENTAL (WORD, Word, LIBELFBITS); 36 FUNDAMENTAL (SWORD, Sword, LIBELFBITS); 37 FUNDAMENTAL (XWORD, Xword, LIBELFBITS); 38 FUNDAMENTAL (SXWORD, Sxword, LIBELFBITS); 41 TYPE (Ehdr, LIBELFBITS) 42 TYPE (Phdr, LIBELFBITS) 43 TYPE (Shdr, LIBELFBITS) [all …]
|
D | elf32_updatefile.c | 47 #ifndef LIBELFBITS 48 # define LIBELFBITS 32 macro 58 if ((*scna)->shdr.ELFW(e,LIBELFBITS)->sh_offset in compare_sections() 59 < (*scnb)->shdr.ELFW(e,LIBELFBITS)->sh_offset) in compare_sections() 62 if ((*scna)->shdr.ELFW(e,LIBELFBITS)->sh_offset in compare_sections() 63 > (*scnb)->shdr.ELFW(e,LIBELFBITS)->sh_offset) in compare_sections() 66 if ((*scna)->shdr.ELFW(e,LIBELFBITS)->sh_size in compare_sections() 67 < (*scnb)->shdr.ELFW(e,LIBELFBITS)->sh_size) in compare_sections() 70 if ((*scna)->shdr.ELFW(e,LIBELFBITS)->sh_size in compare_sections() 71 > (*scnb)->shdr.ELFW(e,LIBELFBITS)->sh_size) in compare_sections() [all …]
|
D | elf32_updatenull.c | 44 #ifndef LIBELFBITS 45 # define LIBELFBITS 32 macro 51 ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr, in ELFW() argument 58 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; in ELFW() 62 update_if_changed (ehdr->e_ident[EI_CLASS], ELFW(ELFCLASS,LIBELFBITS), in ELFW() 63 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags); in ELFW() 70 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; in ELFW() 85 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags); in ELFW() 90 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; in ELFW() 101 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags); in ELFW() [all …]
|
D | elf32_getphdr.c | 44 #ifndef LIBELFBITS 45 # define LIBELFBITS 32 macro 48 ElfW2(LIBELFBITS,Phdr) * in ElfW2() argument 49 __elfw2(LIBELFBITS,getphdr_wrlock) (Elf *elf) in ElfW2() 51 ElfW2(LIBELFBITS,Phdr) *result; in ElfW2() 56 result = elf->state.ELFW(elf,LIBELFBITS).phdr; in ElfW2() 61 elf->class = ELFW(ELFCLASS,LIBELFBITS); in ElfW2() 62 else if (elf->class != ELFW(ELFCLASS,LIBELFBITS)) in ElfW2() 72 ElfW2(LIBELFBITS,Ehdr) *ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr; in ElfW2() 85 size_t size = phnum * sizeof (ElfW2(LIBELFBITS,Phdr)); in ElfW2() [all …]
|
D | elf32_getshdr.c | 43 #ifndef LIBELFBITS 44 # define LIBELFBITS 32 macro 48 static ElfW2(LIBELFBITS,Shdr) * in ElfW2() argument 51 ElfW2(LIBELFBITS,Shdr) *result; in ElfW2() 55 ElfW2(LIBELFBITS,Ehdr) *ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr; in ElfW2() 58 result = scn->shdr.ELFW(e,LIBELFBITS); in ElfW2() 64 || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr))) in ElfW2() 66 size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr)); in ElfW2() 70 ElfW2(LIBELFBITS,Shdr) *shdr = elf->state.ELFW(elf,LIBELFBITS).shdr = in ElfW2() 71 (ElfW2(LIBELFBITS,Shdr) *) malloc (size); in ElfW2() [all …]
|
D | elf32_newehdr.c | 39 #ifndef LIBELFBITS 40 # define LIBELFBITS 32 macro 44 ElfW2(LIBELFBITS,Ehdr) * in ElfW2() argument 45 elfw2(LIBELFBITS,newehdr) (Elf *elf) in ElfW2() 47 ElfW2(LIBELFBITS,Ehdr) *result; in ElfW2() 61 elf->class = ELFW(ELFCLASS,LIBELFBITS); in ElfW2() 62 else if (unlikely (elf->class != ELFW(ELFCLASS,LIBELFBITS))) in ElfW2() 70 if (elf->state.ELFW(elf,LIBELFBITS).ehdr == NULL) in ElfW2() 73 elf->state.ELFW(elf,LIBELFBITS).ehdr = in ElfW2() 74 &elf->state.ELFW(elf,LIBELFBITS).ehdr_mem; in ElfW2() [all …]
|
D | elf32_getehdr.c | 39 #ifndef LIBELFBITS 40 # define LIBELFBITS 32 macro 44 static ElfW2(LIBELFBITS,Ehdr) * in ElfW2() argument 66 elf->class = ELFW(ELFCLASS,LIBELFBITS); in ElfW2() 68 else if (unlikely (elf->class != ELFW(ELFCLASS,LIBELFBITS))) in ElfW2() 74 return elf->state.ELFW(elf,LIBELFBITS).ehdr; in ElfW2() 77 ElfW2(LIBELFBITS,Ehdr) * in ElfW2() argument 79 __elfw2(LIBELFBITS,getehdr_wrlock) (Elf *elf) in ElfW2() 84 ElfW2(LIBELFBITS,Ehdr) * in ElfW2() argument 85 elfw2(LIBELFBITS,getehdr) (Elf *elf) in ElfW2() [all …]
|
D | elf32_offscn.c | 40 #ifndef LIBELFBITS 41 # define LIBELFBITS 32 macro 46 elfw2(LIBELFBITS,offscn) (Elf *elf, ElfW2(LIBELFBITS,Off) offset) in elfw2() argument 57 Elf_ScnList *runp = &elf->state.ELFW(elf,LIBELFBITS).scns; in elfw2() 62 && unlikely (runp->data[0].shdr.ELFW(e,LIBELFBITS) == NULL) in elfw2() 63 && unlikely (elfw2(LIBELFBITS,getshdr) (&runp->data[0]) == NULL)) in elfw2() 74 if (runp->data[i].shdr.ELFW(e,LIBELFBITS)->sh_offset == offset) in elfw2() 81 if (runp->data[i].shdr.ELFW(e,LIBELFBITS)->sh_size != 0 in elfw2() 82 && runp->data[i].shdr.ELFW(e,LIBELFBITS)->sh_type != SHT_NOBITS) in elfw2() 99 INTDEF(elfw2(LIBELFBITS,offscn))
|
D | elf32_getchdr.c | 37 #ifndef LIBELFBITS 38 # define LIBELFBITS 32 macro 42 ElfW2(LIBELFBITS,Chdr) * in ElfW2() argument 43 elfw2(LIBELFBITS,getchdr) (Elf_Scn *scn) in ElfW2() 45 ElfW2(LIBELFBITS,Shdr) *shdr = elfw2(LIBELFBITS,getshdr) (scn); in ElfW2() 76 if (d->d_size < sizeof (ElfW2(LIBELFBITS,Chdr)) || d->d_buf == NULL) in ElfW2() 82 return (ElfW2(LIBELFBITS,Chdr) *) d->d_buf; in ElfW2()
|
D | elf32_checksum.c | 44 #ifndef LIBELFBITS 45 # define LIBELFBITS 32 macro 54 elfw2(LIBELFBITS,checksum) (Elf *elf) in elfw2() argument 75 ident = elf->state.ELFW(elf,LIBELFBITS).ehdr->e_ident; in elfw2() 145 if (INTUSE(elfw2(LIBELFBITS,xlatetof)) (data, data, ident[EI_DATA]) in elfw2() 155 if (INTUSE(elfw2(LIBELFBITS,xlatetom)) (data, data, ident[EI_DATA]) in elfw2() 168 INTDEF(elfw2(LIBELFBITS,checksum))
|
D | elf32_xlatetom.c | 40 #ifndef LIBELFBITS 41 # define LIBELFBITS 32 macro 46 elfw2(LIBELFBITS, xlatetom) (Elf_Data *dest, const Elf_Data *src, in elfw2() argument 53 size_t recsize = __libelf_type_sizes[ELFW(ELFCLASS,LIBELFBITS) - 1][src->d_type]; in elfw2() 101 fctp = __elf_xfctstom[ELFW(ELFCLASS, LIBELFBITS) - 1][src->d_type]; in elfw2() 114 INTDEF(elfw2(LIBELFBITS, xlatetom))
|
D | elf32_xlatetof.c | 40 #ifndef LIBELFBITS 41 # define LIBELFBITS 32 macro 46 elfw2(LIBELFBITS, xlatetof) (Elf_Data *dest, const Elf_Data *src, in elfw2() argument 53 size_t recsize = __libelf_type_sizes[ELFW(ELFCLASS,LIBELFBITS) - 1][src->d_type]; in elfw2() 96 fctp = __elf_xfctstom[ELFW(ELFCLASS, LIBELFBITS) - 1][src->d_type]; in elfw2() 109 INTDEF(elfw2(LIBELFBITS, xlatetof))
|
D | elf32_fsize.c | 37 #ifndef LIBELFBITS 38 # define LIBELFBITS 32 macro 43 elfw2(LIBELFBITS, fsize) (Elf_Type type, size_t count, unsigned int version) in elfw2() argument 59 return (count * __libelf_type_sizes[ELFW(ELFCLASS,LIBELFBITS) - 1][type]); in elfw2()
|
D | gelf_xlate.c | 41 #ifndef LIBELFBITS 42 # define LIBELFBITS 32 macro 156 #define LIBELFBITS 32 macro 160 #define LIBELFBITS 64 macro
|
D | elf64_fsize.c | 30 #define LIBELFBITS 64 macro
|
D | elf64_getehdr.c | 30 #define LIBELFBITS 64 macro
|
D | elf64_getchdr.c | 29 #define LIBELFBITS 64 macro
|
D | elf64_newphdr.c | 30 #define LIBELFBITS 64 macro
|
D | elf64_newehdr.c | 30 #define LIBELFBITS 64 macro
|
D | elf64_xlatetof.c | 30 #define LIBELFBITS 64 macro
|
D | elf64_updatenull.c | 29 #define LIBELFBITS 64 macro
|
D | elf64_updatefile.c | 29 #define LIBELFBITS 64 macro
|
D | elf64_xlatetom.c | 30 #define LIBELFBITS 64 macro
|