/macosx-10.10/dtrace-147/libelf/ |
H A D | getehdr.c | 38 getehdr(Elf * elf, int class) argument 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); 60 elf32_getehdr(Elf * elf) argument 67 elf64_getehdr(Elf * elf) argument [all...] |
H A D | getphdr.c | 38 getphdr(Elf * elf, int class) argument 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); 58 elf32_getphdr(Elf * elf) argument 64 elf64_getphdr(Elf * elf) argument [all...] |
H A D | rand.c | 37 elf_rand(Elf * elf, size_t off) argument 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)
|
H A D | cntl.c | 37 elf_cntl(Elf * elf, Elf_Cmd cmd) argument 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))) 57 elf [all...] |
H A D | getident.c | 37 elf_getident(Elf * elf, size_t * ptr) argument 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) && 54 (_elf_vm(elf, (size_ [all...] |
H A D | getbase.c | 37 elf_getbase(Elf * elf) argument 40 if (elf == 0) 42 ELFRLOCK(elf) 43 rc = elf->ed_baseoff; 44 ELFUNLOCK(elf)
|
H A D | kind.c | 37 elf_kind(Elf * elf) argument 40 if (elf == 0) 42 ELFRLOCK(elf); 43 rc = elf->ed_kind; 44 ELFUNLOCK(elf);
|
H A D | nextscn.c | 37 elf_nextscn(Elf * elf, Elf_Scn * scn) argument 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) 55 ELFUNLOCK(elf) [all...] |
H A D | rawfile.c | 37 elf_rawfile(Elf * elf, size_t * ptr) argument 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 [all...] |
H A D | next.c | 37 elf_next(Elf * elf) argument 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; 57 ELFUNLOCK(elf);
|
H A D | getarhdr.c | 40 elf_getarhdr(Elf * elf) argument 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)
|
H A D | newehdr.c | 64 elf_newehdr(Elf * elf) argument 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) 90 if (elf [all...] |
H A D | newphdr.c | 68 elf_newphdr(Elf * elf, size_t count) argument 75 if (elf == 0) 77 ELFRLOCK(elf) 78 if (elf->ed_class != ELFCLASS) { 80 ELFUNLOCK(elf) 83 ELFUNLOCK(elf) 84 if (elf_getehdr(elf) == 0) { /* this cooks if necessary */ 95 ELFWLOCK(elf) 96 if (elf->ed_myflags & EDF_PHALLOC) { 97 elf [all...] |
H A D | end.c | 39 elf_end(Elf * elf) argument 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) { 101 if (elf [all...] |
H A D | 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) argument 68 if (elf == 0) 71 ELFWLOCK(elf) 72 rc = elf->ed_ehflags |= flags; 73 ELFUNLOCK(elf) 77 ELFWLOCK(elf) 88 elf_flagelf(Elf * elf, Elf_Cmd cmd, unsigned flags) argument 111 elf_flagphdr(Elf * elf, Elf_Cmd cmd, unsigned flags) argument 137 Elf * elf; local 164 Elf * elf; local [all...] |
H A D | cook.c | 112 _elf_slide(Elf * elf) argument 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; 136 elf->ed_armem->m_slide = sz; 137 if (_elf_vm(par, elf 163 _elf_cook(Elf * elf) argument 237 Elf * elf = s->s_elf; local [all...] |
H A D | getscn.c | 38 elf_getscn(Elf * elf, size_t index) argument 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)) { 54 ELFUNLOCK(elf); [all...] |
H A D | newscn.c | 38 elf_newscn(Elf * elf) argument 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) { 63 if (elf [all...] |
H A D | ndxscn.c | 40 Elf * elf; local 44 elf = scn->s_elf; 45 READLOCKS(elf, scn) 47 READUNLOCKS(elf, scn)
|
H A D | 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) argument 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; 131 hdreg = &elf 200 _elf_inmap(Elf * elf) argument [all...] |
H A D | 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)
|
H A D | getarsym.c | 124 elf_getarsym(Elf * elf, size_t * ptr) argument 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; 147 ELFUNLOCK(elf); [all...] |
H A D | _libelf.h | 46 extern GElf_Xword _gelf_getdyndtflags_1(Elf *elf); 47 extern int _elf_swap_wrimage(Elf *elf);
|
H A D | begin.c | 189 register Elf *elf; local 215 if ((elf = (Elf *)calloc(1, sizeof (Elf))) == 0) { 220 elf->ed_parent = ref; 221 elf->ed_fd = fd; 222 elf->ed_myflags |= flags; 223 elf->ed_armem = mh; 224 elf->ed_fsz = mh->m_hdr.ar_size; 225 elf->ed_baseoff = ref->ed_baseoff + base; 226 elf->ed_memoff = base - mh->m_slide; 227 elf 249 Elf *elf; local 269 _elf_config(Elf * elf) argument 581 Elf *elf; local 682 register Elf *elf; local [all...] |
H A D | rawdata.c | 44 Elf * elf; local 48 elf = scn->s_elf; 49 READLOCKS(elf, scn) 51 UPGRADELOCKS(elf, scn) 54 DOWNGRADELOCKS(elf, scn) 63 READUNLOCKS(elf, scn) 69 READUNLOCKS(elf, scn) 81 READUNLOCKS(elf, scn) 86 READUNLOCKS(elf, scn) 94 READUNLOCKS(elf, sc [all...] |