Lines Matching refs:e

68 static void *one_section64(struct vdso_elfinfo64 *e, const char *name,  in one_section64()  argument
75 shdrs = (void *)e->hdr + e->hdr->e_shoff; in one_section64()
76 snames = (void *)e->hdr + shdrs[e->hdr->e_shstrndx].sh_offset; in one_section64()
77 for (i = 1; i < e->hdr->e_shnum; i++) { in one_section64()
81 return (void *)e->hdr + shdrs[i].sh_offset; in one_section64()
89 struct vdso_elfinfo64 *e = &_e->u.elf64; in find_sections64() local
91 e->hdr = image->data; in find_sections64()
92 e->dynsym = one_section64(e, ".dynsym", &e->dynsymsize); in find_sections64()
93 e->dynstr = one_section64(e, ".dynstr", NULL); in find_sections64()
95 if (!e->dynsym || !e->dynstr) { in find_sections64()
102 static Elf64_Sym *find_sym64(const struct vdso_elfinfo64 *e, const char *name) in find_sym64() argument
106 for (i = 0; i < (e->dynsymsize / sizeof(Elf64_Sym)); i++) { in find_sym64()
107 Elf64_Sym *s = &e->dynsym[i]; in find_sym64()
110 if (!strcmp(e->dynstr + s->st_name, name)) in find_sym64()
119 struct vdso_elfinfo64 *e = &_e->u.elf64; in patchsym64() local
120 Elf64_Sym *osym = find_sym64(e, orig); in patchsym64()
121 Elf64_Sym *nsym = find_sym64(e, new); in patchsym64()
136 static void *one_section32(struct vdso_elfinfo32 *e, const char *name, in one_section32() argument
143 shdrs = (void *)e->hdr + e->hdr->e_shoff; in one_section32()
144 snames = (void *)e->hdr + shdrs[e->hdr->e_shstrndx].sh_offset; in one_section32()
145 for (i = 1; i < e->hdr->e_shnum; i++) { in one_section32()
149 return (void *)e->hdr + shdrs[i].sh_offset; in one_section32()
157 struct vdso_elfinfo32 *e = &_e->u.elf32; in find_sections32() local
159 e->hdr = image->data; in find_sections32()
160 e->dynsym = one_section32(e, ".dynsym", &e->dynsymsize); in find_sections32()
161 e->dynstr = one_section32(e, ".dynstr", NULL); in find_sections32()
163 if (!e->dynsym || !e->dynstr) { in find_sections32()
170 static Elf32_Sym *find_sym32(const struct vdso_elfinfo32 *e, const char *name) in find_sym32() argument
174 for (i = 0; i < (e->dynsymsize / sizeof(Elf32_Sym)); i++) { in find_sym32()
175 Elf32_Sym *s = &e->dynsym[i]; in find_sym32()
178 if (!strcmp(e->dynstr + s->st_name, name)) in find_sym32()
187 struct vdso_elfinfo32 *e = &_e->u.elf32; in patchsym32() local
188 Elf32_Sym *osym = find_sym32(e, orig); in patchsym32()
189 Elf32_Sym *nsym = find_sym32(e, new); in patchsym32()
204 static int find_sections(const struct vdso_image *image, struct vdso_elfinfo *e, in find_sections() argument
208 return find_sections64(image, e); in find_sections()
210 return find_sections32(image, e); in find_sections()
213 static int patch_one_symbol(struct vdso_elfinfo *e, const char *orig, in patch_one_symbol() argument
217 return patchsym64(e, orig, new_target); in patch_one_symbol()
219 return patchsym32(e, orig, new_target); in patch_one_symbol()
222 static int stick_patch(const struct vdso_image *image, struct vdso_elfinfo *e, bool elf64) in stick_patch() argument
226 err = find_sections(image, e, elf64); in stick_patch()
230 err = patch_one_symbol(e, in stick_patch()
236 return patch_one_symbol(e, in stick_patch()