/illumos-gate/usr/src/uts/common/sys/ |
H A D | Makefile | 218 elf.h \
|
/illumos-gate/usr/src/uts/common/ |
H A D | Makefile.files | 1067 ELFEXEC_OBJS += elf.o elf_notes.o old_notes.o core_shstrtab.o
|
H A D | Makefile.rules | 216 $(OBJS_DIR)/%.o: $(UTSBASE)/common/exec/elf/%.c
|
/illumos-gate/usr/src/test/ |
H A D | Makefile | 25 elf-tests \
|
/illumos-gate/usr/src/cmd/dtrace/ |
H A D | dtrace.c | 1294 Elf *elf; in main() local 1301 if ((elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { in main() 1306 if (elf_kind(elf) != ELF_K_ELF || in main() 1307 gelf_getehdr(elf, &ehdr) == NULL) { in main() 1309 (void) elf_end(elf); in main() 1314 (void) elf_end(elf); in main()
|
/illumos-gate/usr/src/pkg/manifests/ |
H A D | system-header.p5m | 230 file path=usr/include/elf.h 852 file path=usr/include/sys/elf.h
|
/illumos-gate/usr/src/cmd/boot/bootadm/ |
H A D | bootadm.c | 2207 _elfhdr elf; in update_dircache() local 2222 if (read(fd, (void *)&elf, sizeof (_elfhdr)) < 0) { in update_dircache() 2232 if (memcmp(elf.e_ident, ELFMAG, 4) != 0) { in update_dircache() 2237 switch (elf.e_ident[EI_CLASS]) { in update_dircache()
|
/illumos-gate/usr/src/cmd/sgs/libelf/common/ |
H A D | xlate64.m4 | 762 _elf64_mtype(Elf * elf, Elf64_Word shtype, unsigned ver) 764 Elf64_Ehdr * ehdr = (Elf64_Ehdr *)elf->ed_ehdr; 838 _elf64_entsz(Elf *elf, Elf64_Word shtype, unsigned ver) 842 ttype = _elf64_mtype(elf, shtype, ver);
|
H A D | xlate.m4 | 705 _elf32_mtype(Elf * elf, Elf32_Word shtype, unsigned ver) 707 Elf32_Ehdr * ehdr = (Elf32_Ehdr *)elf->ed_ehdr; 786 _elf32_entsz(Elf *elf, Elf32_Word shtype, unsigned ver) 790 ttype = _elf32_mtype(elf, shtype, ver);
|
H A D | gelf.c | 59 if (elf == NULL) in gelf_fsize() 76 if (elf == NULL) in gelf_getclass() 91 if (elf == NULL) in gelf_getehdr() 101 ELFRLOCK(elf); in gelf_getehdr() 116 ELFUNLOCK(elf); in gelf_getehdr() 125 ELFRLOCK(elf); in gelf_getehdr() 127 ELFUNLOCK(elf); in gelf_getehdr() 159 ELFWLOCK(elf); in gelf_update_ehdr() 187 ELFWLOCK(elf); in gelf_update_ehdr() 241 ELFRLOCK(elf); in gelf_getphdr() [all …]
|
H A D | getarsym.c | 186 if (elf == NULL) in elf_getarsym() 188 ELFRLOCK(elf); in elf_getarsym() 190 ELFUNLOCK(elf); in elf_getarsym() 195 ELFUNLOCK(elf); in elf_getarsym() 210 ELFUNLOCK(elf) in elf_getarsym() 211 ELFWLOCK(elf) in elf_getarsym() 213 if (_elf_vm(elf, (size_t)(as - (Byte *)elf->ed_ident), sz) != in elf_getarsym() 226 ELFUNLOCK(elf); in elf_getarsym() 249 ELFRLOCK(elf); in _elf_getarsymwordsize() 250 if ((elf->ed_kind == ELF_K_AR) && (elf->ed_arsym != 0)) in _elf_getarsymwordsize() [all …]
|
/illumos-gate/usr/src/lib/libctf/common/ |
H A D | ctf_convert.c | 36 ctf_has_c_source(Elf *elf, char *errmsg, size_t errlen) in ctf_has_c_source() argument 45 while ((scn = elf_nextscn(elf, scn)) != NULL) { in ctf_has_c_source() 62 if ((strscn = elf_getscn(elf, shdr.sh_link)) == NULL) { in ctf_has_c_source() 126 if (elf == NULL) { in ctf_elfconvert() 131 if (elf_kind(elf) != ELF_K_ELF) { in ctf_elfconvert() 136 switch (ctf_has_c_source(elf, errbuf, errlen)) { in ctf_elfconvert() 319 Elf *elf; in ctf_fdconvert() local 325 elf = elf_begin(fd, ELF_C_READ, NULL); in ctf_fdconvert() 326 if (elf == NULL) { in ctf_fdconvert() 331 fp = ctf_elfconvert(cch, fd, elf, errp, errbuf, errlen); in ctf_fdconvert() [all …]
|
/illumos-gate/usr/src/cmd/ctfmerge/ |
H A D | ctfmerge.c | 70 ctfmerge_check_for_c(const char *name, Elf *elf, uint_t flags) in ctfmerge_check_for_c() argument 77 switch (ctf_has_c_source(elf, errmsg, sizeof (errmsg))) { in ctfmerge_check_for_c() 97 ctfmerge_elfopen(const char *name, Elf *elf, ctf_merge_t *cmh, uint_t flags) in ctfmerge_elfopen() argument 107 if (gelf_getehdr(elf, &ehdr) == NULL) in ctfmerge_elfopen() 116 while ((scn = elf_nextscn(elf, scn)) != NULL) { in ctfmerge_elfopen() 123 sname = elf_strptr(elf, ehdr.e_shstrndx, shdr.sh_name); in ctfmerge_elfopen() 150 if ((strscn = elf_getscn(elf, shdr.sh_link)) == NULL || in ctfmerge_elfopen() 156 strsect.cts_name = elf_strptr(elf, ehdr.e_shstrndx, in ctfmerge_elfopen() 181 ctfmerge_check_for_c(name, elf, flags); in ctfmerge_elfopen() 206 ctfmerge_read_archive(const char *name, int fd, Elf *elf, in ctfmerge_read_archive() argument [all …]
|
/illumos-gate/usr/src/cmd/sgs/rtld/sparcv9/ |
H A D | Makefile | 31 analyze.o elf.o external.o globals.o \
|
/illumos-gate/usr/src/cmd/sgs/rtld/sparc/ |
H A D | Makefile | 31 analyze.o elf.o external.o globals.o \
|
/illumos-gate/usr/src/cmd/sgs/rtld/i386/ |
H A D | Makefile | 33 analyze.o elf.o external.o globals.o \
|
/illumos-gate/usr/src/cmd/sgs/rtld/amd64/ |
H A D | Makefile | 33 analyze.o elf.o external.o globals.o \
|
/illumos-gate/usr/src/cmd/sgs/crle/common/ |
H A D | inspect.c | 658 Elf *elf; in inspect_file() local 718 if ((elf_kind(elf) != ELF_K_ELF) || in inspect_file() 727 (void) elf_end(elf); in inspect_file() 739 dyflags = _gelf_getdyndtflags_1(elf); in inspect_file() 751 (void) elf_end(elf); in inspect_file() 762 (void) elf_end(elf); in inspect_file() 775 (void) elf_end(elf); in inspect_file() 784 (void) elf_end(elf); in inspect_file() 800 (void) elf_end(elf); in inspect_file() 836 (void) elf_end(elf); in inspect_file() [all …]
|
/illumos-gate/usr/src/cmd/sgs/elfdump/common/ |
H A D | elfdump.c | 517 if ((phdr = elf_getphdr(elf)) == NULL) { in getphdr() 1754 uchar_t osabi, Elf *elf, uint_t flags) in cap() argument 1768 if ((phdr = elf_getphdr(elf)) == NULL) { in cap() 2978 Word phnum, Elf *elf) in dynamic() argument 4579 checksum(Elf *elf) in checksum() argument 4983 if ((ehdr = elf_getehdr(elf)) == NULL) { in regular() 4988 if (elf_getshdrnum(elf, &shnum) == -1) { in regular() 4998 if (elf_getphdrnum(elf, &phnum) == -1) { in regular() 5013 if ((scn = elf_getscn(elf, 0)) != NULL) { in regular() 5121 if ((phdr = elf_getphdr(elf)) == NULL) { in regular() [all …]
|
/illumos-gate/usr/src/cmd/sgs/elfedit/common/ |
H A D | elfedit.c | 1225 Elf *elf; in init_obj_state() local 1247 elf = elf_begin(fd, ELF_C_RDWR, NULL); in init_obj_state() 1248 if (elf == NULL) { in init_obj_state() 1255 switch (elf_kind(elf)) { in init_obj_state() 1280 state.elf.elfclass = gelf_getclass(elf); in init_obj_state() 1281 switch (state.elf.elfclass) { in init_obj_state() 1283 elfedit32_init_obj_state(file, fd, elf); in init_obj_state() 1805 if (state.elf.elfclass == ELFCLASS32) { in elfedit_load_module() 2204 state.elf.elfconst_ehdr_change = 1; in dispatch_user_cmds() 3362 if (state.elf.elfclass == ELFCLASS32) { in cmd_match_fcn() [all …]
|
H A D | elfedit_machelf.c | 103 elfedit64_init_obj_state(const char *file, int fd, Elf *elf) in elfedit64_init_obj_state() argument 106 elfedit32_init_obj_state(const char *file, int fd, Elf *elf) in elfedit64_init_obj_state() 143 tstate.os_elf = elf; in elfedit64_init_obj_state() 429 state.elf.obj_state.s64 = obj_state; in elfedit64_init_obj_state() 431 state.elf.obj_state.s32 = obj_state; in elfedit64_init_obj_state()
|
H A D | elfconst.c | 381 } else if (state.elf.elfclass == ELFCLASS32) { in init_libconv_strings() 382 *osabi = state.elf.obj_state.s32->os_ehdr->e_ident[EI_OSABI]; in init_libconv_strings() 383 *mach = state.elf.obj_state.s32->os_ehdr->e_machine; in init_libconv_strings() 385 *osabi = state.elf.obj_state.s64->os_ehdr->e_ident[EI_OSABI]; in init_libconv_strings() 386 *mach = state.elf.obj_state.s64->os_ehdr->e_machine; in init_libconv_strings() 443 state.elf.elfconst_ehdr_change = 0; in invalidate_libconv_strings() 445 if (state.elf.elfclass == ELFCLASS32) { in invalidate_libconv_strings() 446 cur_osabi = state.elf.obj_state.s32->os_ehdr->e_ident[EI_OSABI]; in invalidate_libconv_strings() 447 cur_mach = state.elf.obj_state.s32->os_ehdr->e_machine; in invalidate_libconv_strings() 450 cur_mach = state.elf.obj_state.s64->os_ehdr->e_machine; in invalidate_libconv_strings() [all …]
|
/illumos-gate/usr/src/cmd/sgs/pvs/common/ |
H A D | pvs.c | 1007 Elf *elf; in main() local 1099 if ((elf = elf_begin(var, ELF_C_READ, NULL)) == NULL) { in main() 1106 if (elf_kind(elf) != ELF_K_ELF) { in main() 1111 (void) elf_end(elf); in main() 1114 if (gelf_getehdr(elf, &ehdr) == NULL) { in main() 1119 (void) elf_end(elf); in main() 1127 if ((scn = elf_getscn(elf, ehdr.e_shstrndx)) == NULL) { in main() 1132 (void) elf_end(elf); in main() 1140 (void) elf_end(elf); in main() 1154 if (elf_getshdrnum(elf, &shnum) == -1) { in main() [all …]
|
/illumos-gate/usr/src/cmd/sgs/gprof/common/ |
H A D | readelf.c | 76 Elf *elf; in is_shared_obj() local 90 if (gelf_getehdr(elf, &ehdr) == NULL) in is_shared_obj() 93 (void) elf_end(elf); in is_shared_obj() 138 get_txtorigin(Elf *elf) in get_txtorigin() argument 169 Elf *elf; in process_namelist() local 187 get_symtab(elf, module); in process_namelist() 199 Elf *elf; in process() local 227 get_symtab(elf, &modules); in process() 234 get_textseg(elf, fd); in process() 238 get_textseg(Elf *elf, int fd) in get_textseg() argument [all …]
|
/illumos-gate/usr/src/cmd/sgs/libconv/ |
H A D | Makefile.com | 45 elf.o entry.o \
|