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

1234

/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 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 Dnewscn.c36 elf_newscn(Elf * elf) argument
40 if (elf == 0)
43 ELFWLOCK(elf)
48 if ((elf->ed_hdscn == 0) && (_elf_cook(elf) != OK_YES)) {
49 ELFUNLOCK(elf)
52 if (elf->ed_ehdr == 0) {
54 ELFUNLOCK(elf)
58 if (elf->ed_class == ELFCLASS32) {
61 if (elf
[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 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 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...]
H A Dend.c37 elf_end(Elf * elf) argument
44 if (elf == 0)
47 ELFWLOCK(elf)
48 if (--elf->ed_activ != 0) {
49 rc = elf->ed_activ;
50 ELFUNLOCK(elf)
54 while (elf->ed_activ == 0) {
55 for (s = elf->ed_hdscn; s != 0; s = s->s_next) {
90 for (l = elf->ed_memlist; l; l = (Memlist *)trail) {
98 if (elf
[all...]
H A Dgetscn.c36 elf_getscn(Elf * elf, size_t index) argument
43 if (elf == 0)
46 ELFRLOCK(elf)
47 tabsz = elf->ed_scntabsz;
48 if (elf->ed_hdscn == 0) {
49 ELFUNLOCK(elf)
50 ELFWLOCK(elf)
51 if ((elf->ed_hdscn == 0) && (_elf_cook(elf) != OK_YES)) {
52 ELFUNLOCK(elf);
[all...]
H A Dnewdata.c40 Elf * elf; local
45 elf = s->s_elf;
46 READLOCKS(elf, s)
49 READUNLOCKS(elf, s)
54 UPGRADELOCKS(elf, s)
62 DOWNGRADELOCKS(elf, s)
78 READUNLOCKS(elf, s)
82 READUNLOCKS(elf, s)
92 READUNLOCKS(elf, s)
/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/mdb/tools/findfp/common/
H A Dfindsym.c38 findelfsym(Elf *elf, uintptr_t addr, char **symnamep, offset_t *offp) argument
45 if ((symtabidx = findelfsecidx(elf, ".symtab")) < 0)
48 if ((scn = elf_getscn(elf, symtabidx)) == NULL ||
68 if ((*symnamep = elf_strptr(elf, shdr.sh_link,
/illumos-gate/usr/src/cmd/sgs/dump/common/
H A Dfcns.c46 ar_sym_read(Elf *elf, char *filename) argument
52 if ((arsym = elf_getarsym(elf, &ptr)) == NULL) {
58 is64 = (_elf_getarsymwordsize(elf) == 8);

Completed in 212 milliseconds

1234