Searched defs:elf (Results 1 - 25 of 102) sorted by relevance

12345

/illumos-gate/usr/src/cmd/sgs/libelf/common/
H A Dcntl.c37 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 Dkind.c37 elf_kind(Elf * elf) argument
40 if (elf == 0)
42 ELFRLOCK(elf);
43 rc = elf->ed_kind;
44 ELFUNLOCK(elf);
H A Dndxscn.c40 Elf * elf; local
44 elf = scn->s_elf;
45 READLOCKS(elf, scn)
47 READUNLOCKS(elf, scn)
H A Dgetarhdr.c40 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 Dgetbase.c35 elf_getbase(Elf *elf) argument
38 if (elf == NULL)
40 ELFRLOCK(elf)
41 rc = elf->ed_baseoff;
42 ELFUNLOCK(elf)
55 _elf_getarhdrbase(Elf *elf) argument
58 if (elf == NULL)
60 ELFRLOCK(elf)
61 if (elf->ed_parent == NULL) {
63 ELFUNLOCK(elf);
[all...]
H A Dnewscn.c38 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 Dnext.c37 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 Dnextscn.c37 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 Drand.c34 elf_rand(Elf * elf, size_t off) argument
36 if (elf == 0)
38 ELFWLOCK(elf)
39 if (elf->ed_kind != ELF_K_AR) {
41 ELFUNLOCK(elf)
44 if ((off == 0) || (elf->ed_fsz < off)) {
46 ELFUNLOCK(elf)
49 elf->ed_nextoff = off;
50 ELFUNLOCK(elf)
60 _elf_getnextoff(Elf *elf) argument
[all...]
H A Dgetehdr.c38 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 Dgetident.c37 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 Dgetphdr.c38 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 Dgetphnum.c47 elf_getphdrnum(Elf *elf, size_t *phnum) argument
53 if (gelf_getehdr(elf, &ehdr) == NULL)
61 if ((scn = elf_getscn(elf, 0)) == NULL ||
74 elf_getphnum(Elf *elf, size_t *phnum) argument
76 return (elf_getphdrnum(elf, phnum) == 0);
H A Dgetshnum.c51 elf_getshdrnum(Elf *elf, size_t *shnum) argument
57 if (gelf_getehdr(elf, &ehdr) == 0)
67 if ((scn = elf_getscn(elf, 0)) == 0)
76 elf_getshnum(Elf *elf, size_t *shnum) argument
78 return (elf_getshdrnum(elf, shnum) == 0);
H A Dgetshstrndx.c45 elf_getshdrstrndx(Elf *elf, size_t *shstrndx) argument
51 if (gelf_getehdr(elf, &ehdr) == 0)
57 if ((scn = elf_getscn(elf, 0)) == 0)
66 elf_getshstrndx(Elf *elf, size_t *shstrndx) argument
68 return (elf_getshdrstrndx(elf, shstrndx) == 0);
H A Drawfile.c37 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 Dend.c39 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 Dgetscn.c38 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 Dgetshdr.c41 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 Dnewdata.c42 Elf * elf; local
47 elf = s->s_elf;
48 READLOCKS(elf, s)
51 READUNLOCKS(elf, s)
56 UPGRADELOCKS(elf, s)
64 DOWNGRADELOCKS(elf, s)
80 READUNLOCKS(elf, s)
84 READUNLOCKS(elf, s)
96 READUNLOCKS(elf, s)
H A Dnewehdr.c64 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 Drawdata.c44 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...]
/illumos-gate/usr/src/cmd/mdb/tools/common/
H A Dfindscn.c36 findelfsecidx(Elf *elf, char *tofind) argument
42 if (gelf_getehdr(elf, &ehdr) == NULL)
45 while ((scn = elf_nextscn(elf, scn)) != NULL) {
49 (name = elf_strptr(elf, ehdr.e_shstrndx,
/illumos-gate/usr/src/cmd/sgs/elfedit/common/
H A Dlintsup.c48 elfedit32_init_obj_state(const char *file, int fd, Elf *elf) argument
54 elfedit64_init_obj_state(const char *file, int fd, Elf *elf) argument
/illumos-gate/usr/src/cmd/sgs/elfdump/common/
H A Dlintsup.c46 regular32(const char *file, int fd, Elf *elf, uint_t flags, argument
49 return (regular64(file, fd, elf, flags, wname, wfd, osabi));
53 regular64(const char *file, int fd, Elf *elf, uint_t flags, argument
56 return (regular32(file, fd, elf, flags, wname, wfd, osabi));

Completed in 134 milliseconds

12345