| /onnv/onnv-gate/usr/src/cmd/sgs/libelf/common/ |
| getehdr.c | 38 getehdr(Elf * elf, int class) 41 if (elf == 0) 43 ELFWLOCK(elf); 44 if (elf->ed_class != class) { 46 ELFUNLOCK(elf); 49 if (elf->ed_ehdr == 0) 50 (void) _elf_cook(elf); 52 rc = elf->ed_ehdr; 53 ELFUNLOCK(elf); [all...] |
| getphdr.c | 38 getphdr(Elf * elf, int class) 41 if (elf == 0) 43 ELFWLOCK(elf); 44 if (elf->ed_class != class) { 46 ELFUNLOCK(elf); 49 if (elf->ed_phdr == 0) 50 (void) _elf_cook(elf); 51 rc = elf->ed_phdr; 52 ELFUNLOCK(elf); [all...] |
| cntl.c | 37 elf_cntl(Elf * elf, Elf_Cmd cmd) 40 if (elf == 0) 42 ELFWLOCK(elf); 48 if ((elf->ed_myflags & EDF_READ) == 0) { 50 ELFUNLOCK(elf); 53 if ((elf->ed_status != ES_FROZEN) && 54 ((_elf_cook(elf) != OK_YES) || 55 (_elf_vm(elf, (size_t)0, elf->ed_fsz) != OK_YES)) [all...] |
| getident.c | 37 elf_getident(Elf *elf, size_t *ptr) 42 if (elf != 0) { 43 ELFRLOCK(elf) 44 if (elf->ed_identsz != 0) { 45 if ((elf->ed_vm == 0) || (elf->ed_status != 51 ELFUNLOCK(elf) 52 ELFWLOCK(elf) 53 if ((_elf_cook(elf) == OK_YES) & [all...] |
| rand.c | 37 elf_rand(Elf * elf, size_t off) 39 if (elf == 0) 41 ELFWLOCK(elf) 42 if (elf->ed_kind != ELF_K_AR) { 44 ELFUNLOCK(elf) 47 if ((off == 0) || (elf->ed_fsz < off)) { 49 ELFUNLOCK(elf) 52 elf->ed_nextoff = off; 53 ELFUNLOCK(elf) [all...] |
| getbase.c | 37 elf_getbase(Elf * elf) 40 if (elf == 0) 42 ELFRLOCK(elf) 43 rc = elf->ed_baseoff; 44 ELFUNLOCK(elf)
|
| kind.c | 37 elf_kind(Elf * elf) 40 if (elf == 0) 42 ELFRLOCK(elf); 43 rc = elf->ed_kind; 44 ELFUNLOCK(elf);
|
| nextscn.c | 37 elf_nextscn(Elf * elf, Elf_Scn * scn) 41 if (elf == 0) 44 READLOCKS(elf, scn) 46 READUNLOCKS(elf, scn) 48 ELFWLOCK(elf) 49 if (elf->ed_hdscn == 0) { 50 if (elf->ed_hdscn == 0) 51 (void) _elf_cook(elf); 53 if ((scn = elf->ed_hdscn) != 0 [all...] |
| rawfile.c | 37 elf_rawfile(Elf *elf, size_t *ptr) 42 if (elf == 0) { 48 ELFWLOCK(elf) 49 if ((sz = elf->ed_fsz) == 0) { 52 ELFUNLOCK(elf) 56 if (elf->ed_raw != 0) 57 p = elf->ed_raw; 58 else if (elf->ed_status == ES_COOKED) { 59 if ((p = _elf_read(elf->ed_fd, elf->ed_baseoff, sz)) != 0) [all...] |
| next.c | 37 elf_next(Elf * elf) 39 Elf *parent; 41 if (elf == 0) 43 ELFRLOCK(elf) 44 if ((parent = elf->ed_parent) == 0) { 45 ELFUNLOCK(elf); 49 if (elf->ed_siboff >= parent->ed_fsz) { 51 ELFUNLOCK(elf); 55 parent->ed_nextoff = elf->ed_siboff [all...] |
| getarhdr.c | 40 elf_getarhdr(Elf * elf) 45 if (elf == 0) 47 ELFRLOCK(elf) 48 if ((mh = elf->ed_armem) == 0) { 49 ELFUNLOCK(elf) 54 ELFUNLOCK(elf); 59 rc = &elf->ed_armem->m_hdr; 60 ELFUNLOCK(elf)
|
| begin.c | 50 Elf * 51 _elf_member(int fd, Elf * ref, unsigned flags) 53 register Elf *elf; local 79 if ((elf = (Elf *)calloc(1, sizeof (Elf))) == 0) { 84 elf->ed_parent = ref; 85 elf->ed_fd = fd; 86 elf->ed_myflags |= flags 113 Elf *elf; local 201 Elf *elf; local 302 register Elf *elf; local [all...] |
| newehdr.c | 64 elf_newehdr(Elf * elf) 68 if (elf == 0) 75 ELFWLOCK(elf) 76 if (elf->ed_myflags & EDF_READ) { 77 ELFUNLOCK(elf) 78 if ((eh = (Ehdr *)getehdr(elf)) != 0) { 79 ELFWLOCK(elf) 80 elf->ed_ehflags |= ELF_F_DIRTY; 81 ELFUNLOCK(elf) [all...] |
| newphdr.c | 67 elf_newphdr(Elf * elf, size_t count) 74 if (elf == 0) 76 ELFRLOCK(elf) 77 if (elf->ed_class != ELFCLASS) { 79 ELFUNLOCK(elf) 82 ELFUNLOCK(elf) 83 if (elf_getehdr(elf) == 0) { /* this cooks if necessary */ 94 ELFWLOCK(elf) 95 if (elf->ed_myflags & EDF_PHALLOC) [all...] |
| flag.c | 41 Elf * elf; local 49 elf = scn->s_elf; 51 READLOCKS(elf, scn) 59 READUNLOCKS(elf, scn) 65 elf_flagehdr(Elf * elf, Elf_Cmd cmd, unsigned flags) 68 if (elf == 0) 71 ELFWLOCK(elf) 72 rc = elf->ed_ehflags |= flags 137 Elf * elf; local 164 Elf * elf; local [all...] |
| end.c | 39 elf_end(Elf * elf) 46 if (elf == 0) 49 ELFWLOCK(elf) 50 if (--elf->ed_activ != 0) { 51 rc = elf->ed_activ; 52 ELFUNLOCK(elf) 57 while (elf->ed_activ == 0) { 58 for (s = elf->ed_hdscn; s != 0; s = s->s_next) { 93 for (l = elf->ed_memlist; l; l = (Memlist *)trail) [all...] |
| getscn.c | 38 elf_getscn(Elf * elf, size_t index) 45 if (elf == 0) 48 ELFRLOCK(elf) 49 tabsz = elf->ed_scntabsz; 50 if (elf->ed_hdscn == 0) { 51 ELFUNLOCK(elf) 52 ELFWLOCK(elf) 53 if ((elf->ed_hdscn == 0) && (_elf_cook(elf) != OK_YES)) [all...] |
| newscn.c | 38 elf_newscn(Elf * elf) 42 if (elf == 0) 45 ELFWLOCK(elf) 50 if ((elf->ed_hdscn == 0) && (_elf_cook(elf) != OK_YES)) { 51 ELFUNLOCK(elf) 54 if (elf->ed_ehdr == 0) { 56 ELFUNLOCK(elf) 60 if (elf->ed_class == ELFCLASS32) [all...] |
| cook.c | 112 _elf_slide(Elf * elf) 114 NOTE(ASSUMING_PROTECTED(*elf)) 115 Elf *par = elf->ed_parent; 118 register char *src = elf->ed_ident; 127 if (elf->ed_ident[EI_CLASS] == ELFCLASS64) 131 if ((sz = (size_t)(src - (char *)elf->ed_image) % szof) == 0) 134 elf->ed_ident -= sz; 135 elf->ed_memoff -= sz 234 Elf * elf = s->s_elf; local [all...] |
| ndxscn.c | 40 Elf * elf; local 44 elf = scn->s_elf; 45 READLOCKS(elf, scn) 47 READUNLOCKS(elf, scn)
|
| input.c | 52 * An elf descriptor has a bit array to manage this. Each bit 87 _elf_vm(Elf * elf, size_t base, size_t sz) 89 NOTE(ASSUMING_PROTECTED(*elf)) 101 if ((base + sz) > elf->ed_fsz) { 113 if (elf->ed_vm == 0 || sz == 0) 123 if (elf->ed_parent && elf->ed_parent->ed_fd == -1) 124 elf->ed_fd = -1; 126 base += elf->ed_baseoff [all...] |
| getshdr.c | 41 Elf * elf; local 44 elf = scn->s_elf; 45 READLOCKS(elf, scn) 46 if (elf->ed_class != class) { 47 READUNLOCKS(elf, scn) 53 READUNLOCKS(elf, scn)
|
| getarsym.c | 124 elf_getarsym(Elf *elf, size_t *ptr) 132 if (elf == 0) 134 ELFRLOCK(elf); 135 if (elf->ed_kind != ELF_K_AR) { 136 ELFUNLOCK(elf); 140 if ((as = (Byte *)elf->ed_arsym) == 0) { 141 ELFUNLOCK(elf); 144 if (elf->ed_myflags & EDF_ASALLOC) { 146 *ptr = elf->ed_arsymsz [all...] |
| clscook.c | 93 _elf_prepscn(Elf *elf, size_t cnt) 95 NOTE(ASSUMING_PROTECTED(*elf)) 107 elf->ed_scntabsz = cnt; 109 elf->ed_hdscn = s; 112 s->s_elf = elf; 114 s->s_index = s - elf->ed_hdscn; 127 elf->ed_tlscn = --s; 136 s = elf->ed_hdscn; 149 Elf * elf local [all...] |
| /onnv/onnv-gate/usr/src/head/ |
| elf.h | 31 #include <sys/elf.h>
|