Home
last modified time | relevance | path

Searched refs:elf (Results 1 – 25 of 170) sorted by relevance

1234567

/illumos-gate/usr/src/man/man3elf/
H A DMakefile21 MANFILES= elf.3elf \
128 elf_end.3elf := LINKSRC = elf_begin.3elf
156 gelf_fsize.3elf := LINKSRC = gelf.3elf
157 gelf_getcap.3elf := LINKSRC = gelf.3elf
159 gelf_getdyn.3elf := LINKSRC = gelf.3elf
160 gelf_getehdr.3elf := LINKSRC = gelf.3elf
161 gelf_getmove.3elf := LINKSRC = gelf.3elf
162 gelf_getphdr.3elf := LINKSRC = gelf.3elf
163 gelf_getrel.3elf := LINKSRC = gelf.3elf
164 gelf_getrela.3elf := LINKSRC = gelf.3elf
[all …]
/illumos-gate/usr/src/pkg/manifests/
H A Dsystem-library.man3elf.inc17 file path=usr/share/man/man3elf/elf.3elf
38 link path=usr/share/man/man3elf/elf_end.3elf target=elf_begin.3elf
40 link path=usr/share/man/man3elf/elf_errno.3elf target=elf_errmsg.3elf
76 link path=usr/share/man/man3elf/gelf_fsize.3elf target=gelf.3elf
77 link path=usr/share/man/man3elf/gelf_getcap.3elf target=gelf.3elf
79 link path=usr/share/man/man3elf/gelf_getdyn.3elf target=gelf.3elf
80 link path=usr/share/man/man3elf/gelf_getehdr.3elf target=gelf.3elf
81 link path=usr/share/man/man3elf/gelf_getmove.3elf target=gelf.3elf
82 link path=usr/share/man/man3elf/gelf_getphdr.3elf target=gelf.3elf
83 link path=usr/share/man/man3elf/gelf_getrel.3elf target=gelf.3elf
[all …]
H A Dsystem-test-elftest.p5m20 dir path=opt/elf-tests
21 file path=opt/elf-tests/README mode=0444
22 dir path=opt/elf-tests/bin
24 dir path=opt/elf-tests/runfiles
26 dir path=opt/elf-tests/tests
30 dir path=opt/elf-tests/tests/capabilities
33 dir path=opt/elf-tests/tests/groups
54 dir path=opt/elf-tests/tests/mapfiles
96 dir path=opt/elf-tests/tests/relocs
119 dir path=opt/elf-tests/tests/sections
[all …]
/illumos-gate/usr/src/cmd/sgs/libelf/common/
H A Dbegin.c89 elf->ed_siboff = base + elf->ed_fsz + (elf->ed_fsz & 1); in _elf_member()
104 return (elf); in _elf_member()
111 Elf *elf; in _elf_regular() local
121 free(elf); in _elf_regular()
161 if (mprotect((char *)elf->ed_image, elf->ed_imagesz, in _elf_config()
188 if ((elf->ed_identsz = elf->ed_fsz) > 512) in _elf_config()
197 Elf *elf; in elf_memory() local
215 elf->ed_image = elf->ed_ident = image; in elf_memory()
216 elf->ed_imagesz = elf->ed_fsz = elf->ed_identsz = sz; in elf_memory()
224 elf = _elf_config(elf); in elf_memory()
[all …]
H A Dcook.c108 _elf_slide(Elf * elf) in _elf_slide() argument
129 elf->ed_ident -= sz; in _elf_slide()
132 if (_elf_vm(par, elf->ed_memoff, sz + elf->ed_fsz) != OK_YES) in _elf_slide()
140 if ((elf->ed_vm == 0) && ((elf->ed_myflags & EDF_WRITE) == 0) && in _elf_slide()
142 if (mprotect((char *)elf->ed_image, elf->ed_imagesz, in _elf_slide()
158 _elf_cook(Elf * elf) in _elf_cook() argument
172 if (elf->ed_status == ES_FRESH && _elf_slide(elf) != 0) in _elf_cook()
211 free(elf->ed_phdr); in _elf_cook()
213 elf->ed_phdr = 0; in _elf_cook()
217 free(elf->ed_ehdr); in _elf_cook()
[all …]
H A Dclscook.c106 elf->ed_hdscn = s; in _elf_prepscn()
109 s->s_elf = elf; in _elf_prepscn()
133 s = elf->ed_hdscn; in _elf_prepscn()
144 Elf * elf; in _elf_cookscn() local
161 elf = s->s_elf; in _elf_cookscn()
228 elf->ed_ehdr = (Ehdr *)elf->ed_ident; in _elf_ehdr()
259 elf->ed_ehdr = 0; in _elf_ehdr()
269 elf->ed_ehdr = 0; in _elf_ehdr()
273 if (((Ehdr*)elf->ed_ehdr)->e_version != elf->ed_version) { in _elf_ehdr()
316 elf->ed_phdr = (Elf_Void *)(elf->ed_ident + eh->e_phoff); in _elf_phdr()
[all …]
H A Dflag.c39 Elf * elf; in elf_flagdata() local
66 if (elf == 0) in elf_flagehdr()
69 ELFWLOCK(elf) in elf_flagehdr()
71 ELFUNLOCK(elf) in elf_flagehdr()
75 ELFWLOCK(elf) in elf_flagehdr()
89 if (elf == 0) in elf_flagelf()
92 ELFWLOCK(elf) in elf_flagelf()
98 ELFWLOCK(elf) in elf_flagelf()
112 if (elf == 0) in elf_flagphdr()
135 Elf * elf; in elf_flagscn() local
[all …]
H A Dnewscn.c40 if (elf == 0) in elf_newscn()
43 ELFWLOCK(elf) in elf_newscn()
48 if ((elf->ed_hdscn == 0) && (_elf_cook(elf) != OK_YES)) { in elf_newscn()
49 ELFUNLOCK(elf) in elf_newscn()
54 ELFUNLOCK(elf) in elf_newscn()
67 elf->ed_hdscn = elf->ed_tlscn = &s->sb_scn; in elf_newscn()
71 ELFUNLOCK(elf) in elf_newscn()
83 ELFUNLOCK(elf) in elf_newscn()
94 elf->ed_hdscn = elf->ed_tlscn = &s->sb_scn; in elf_newscn()
110 ELFUNLOCK(elf) in elf_newscn()
[all …]
H A Dend.c37 elf_end(Elf *elf) in elf_end() argument
44 if (elf == NULL) in elf_end()
47 ELFWLOCK(elf) in elf_end()
49 rc = elf->ed_activ; in elf_end()
50 ELFUNLOCK(elf) in elf_end()
122 _elf_unmap(elf->ed_image, elf->ed_imagesz); in elf_end()
126 elf = elf->ed_parent; in elf_end()
131 if (elf == NULL) in elf_end()
137 ELFWLOCK(elf) in elf_end()
138 --elf->ed_activ; in elf_end()
[all …]
H A Dnewphdr.c72 if (elf == 0) in elf_newphdr()
74 ELFRLOCK(elf) in elf_newphdr()
77 ELFUNLOCK(elf) in elf_newphdr()
80 ELFUNLOCK(elf) in elf_newphdr()
92 ELFWLOCK(elf) in elf_newphdr()
95 rc = elf->ed_phdr; in elf_newphdr()
106 elf->ed_phdr = 0; in elf_newphdr()
110 ELFUNLOCK(elf) in elf_newphdr()
117 elf->ed_phdr = 0; in elf_newphdr()
121 ELFUNLOCK(elf) in elf_newphdr()
[all …]
H A Dinput.c118 if (elf->ed_parent && elf->ed_parent->ed_fd == -1) in _elf_vm()
119 elf->ed_fd = -1; in _elf_vm()
121 base += elf->ed_baseoff; in _elf_vm()
163 if (elf->ed_fd < 0) { in _elf_vm()
183 sz = elf->ed_imagesz - off; in _elf_vm()
195 _elf_inmap(Elf * elf) in _elf_inmap() argument
197 int fd = elf->ed_fd; in _elf_inmap()
238 elf->ed_image = elf->ed_ident = p; in _elf_inmap()
239 elf->ed_imagesz = elf->ed_fsz = elf->ed_identsz = sz; in _elf_inmap()
261 elf->ed_image = elf->ed_ident = (char *)elf->ed_vm + vmsz; in _elf_inmap()
[all …]
H A Dnewehdr.c66 if (elf == 0) in elf_newehdr()
73 ELFWLOCK(elf) in elf_newehdr()
75 ELFUNLOCK(elf) in elf_newehdr()
77 ELFWLOCK(elf) in elf_newehdr()
92 ELFUNLOCK(elf) in elf_newehdr()
95 ELFUNLOCK(elf); in elf_newehdr()
97 ELFWLOCK(elf) in elf_newehdr()
99 ELFUNLOCK(elf) in elf_newehdr()
102 ELFWLOCK(elf) in elf_newehdr()
106 ELFUNLOCK(elf) in elf_newehdr()
[all …]
H A Dgetarsym.c186 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 …]
H A Dupdate.c503 (_elf_vm(elf, (size_t)0, elf->ed_fsz) != OK_YES)) in wrt()
750 ELFWLOCK(elf) in _elfxx_update()
754 ELFUNLOCK(elf) in _elfxx_update()
785 sz = _elf_outsync(elf->ed_fd, elf->ed_wrimage, in _elfxx_update()
801 ELFUNLOCK(elf) in _elfxx_update()
807 ELFUNLOCK(elf) in _elfxx_update()
838 ELFUNLOCK(elf) in _elfxx_update()
842 ELFUNLOCK(elf) in _elfxx_update()
869 ELFWLOCK(elf); in _elfxx_swap_wrimage()
966 if (elf == 0) in elf_update()
[all …]
H A Drawfile.c40 if (elf == 0) { in elf_rawfile()
46 ELFWLOCK(elf) in elf_rawfile()
50 ELFUNLOCK(elf) in elf_rawfile()
54 if (elf->ed_raw != 0) in elf_rawfile()
55 p = elf->ed_raw; in elf_rawfile()
57 if ((p = _elf_read(elf->ed_fd, elf->ed_baseoff, sz)) != 0) { in elf_rawfile()
58 elf->ed_raw = p; in elf_rawfile()
63 p = elf->ed_raw = elf->ed_ident; in elf_rawfile()
64 elf->ed_status = ES_FROZEN; in elf_rawfile()
65 if (_elf_vm(elf, (size_t)0, elf->ed_fsz) != OK_YES) { in elf_rawfile()
[all …]
H A Dgetscn.c43 if (elf == 0) in elf_getscn()
46 ELFRLOCK(elf) in elf_getscn()
49 ELFUNLOCK(elf) in elf_getscn()
50 ELFWLOCK(elf) in elf_getscn()
51 if ((elf->ed_hdscn == 0) && (_elf_cook(elf) != OK_YES)) { in elf_getscn()
52 ELFUNLOCK(elf); in elf_getscn()
55 ELFUNLOCK(elf); in elf_getscn()
56 ELFRLOCK(elf) in elf_getscn()
65 ELFUNLOCK(elf); in elf_getscn()
87 ELFUNLOCK(elf) in elf_getscn()
[all …]
H A Dgetdata.c106 #define NALIGN(elf) ((elf->ed_class == ELFCLASS32) ? Nalign32 : Nalign64) argument
107 #define ALIGN(elf) ((elf->ed_class == ELFCLASS32) ? align32 : align64) argument
114 Elf * elf; in _elf_locked_getdata() local
120 elf = scn->s_elf; in _elf_locked_getdata()
123 UPGRADELOCKS(elf, scn) in _elf_locked_getdata()
156 elf = scn->s_elf; in _elf_locked_getdata()
218 if (elf->ed_vm) { in _elf_locked_getdata()
299 Elf * elf; in elf_getdata() local
309 elf = scn->s_elf; in elf_getdata()
310 READLOCKS(elf, scn); in elf_getdata()
[all …]
H A Dgetident.c40 if (elf != 0) { in elf_getident()
41 ELFRLOCK(elf) in elf_getident()
42 if (elf->ed_identsz != 0) { in elf_getident()
43 if ((elf->ed_vm == 0) || (elf->ed_status != in elf_getident()
49 ELFUNLOCK(elf) in elf_getident()
50 ELFWLOCK(elf) in elf_getident()
54 id = elf->ed_ident; in elf_getident()
55 sz = elf->ed_identsz; in elf_getident()
58 id = elf->ed_ident; in elf_getident()
59 sz = elf->ed_identsz; in elf_getident()
[all …]
H A Drand.c36 if (elf == 0) in elf_rand()
38 ELFWLOCK(elf) in elf_rand()
41 ELFUNLOCK(elf) in elf_rand()
46 ELFUNLOCK(elf) in elf_rand()
49 elf->ed_nextoff = off; in elf_rand()
50 ELFUNLOCK(elf) in elf_rand()
64 if (elf == NULL) in _elf_getnextoff()
66 ELFWLOCK(elf) in _elf_getnextoff()
69 ELFUNLOCK(elf) in _elf_getnextoff()
72 off = elf->ed_nextoff; in _elf_getnextoff()
[all …]
H A Dcntl.c35 elf_cntl(Elf * elf, Elf_Cmd cmd) in elf_cntl() argument
38 if (elf == 0) in elf_cntl()
40 ELFWLOCK(elf); in elf_cntl()
48 ELFUNLOCK(elf); in elf_cntl()
53 (_elf_vm(elf, (size_t)0, elf->ed_fsz) != OK_YES))) in elf_cntl()
55 elf->ed_fd = -1; in elf_cntl()
56 ELFUNLOCK(elf); in elf_cntl()
63 ELFUNLOCK(elf); in elf_cntl()
66 elf->ed_fd = -1; in elf_cntl()
67 ELFUNLOCK(elf); in elf_cntl()
[all …]
H A Drawdata.c42 Elf * elf; in elf_rawdata() local
46 elf = scn->s_elf; in elf_rawdata()
47 READLOCKS(elf, scn) in elf_rawdata()
49 UPGRADELOCKS(elf, scn) in elf_rawdata()
61 READUNLOCKS(elf, scn) in elf_rawdata()
67 READUNLOCKS(elf, scn) in elf_rawdata()
79 READUNLOCKS(elf, scn) in elf_rawdata()
84 READUNLOCKS(elf, scn) in elf_rawdata()
92 READUNLOCKS(elf, scn) in elf_rawdata()
105 READUNLOCKS(elf, scn) in elf_rawdata()
[all …]
H A Dgetehdr.c36 getehdr(Elf * elf, int class) in getehdr() argument
39 if (elf == 0) in getehdr()
41 ELFWLOCK(elf); in getehdr()
42 if (elf->ed_class != class) { in getehdr()
44 ELFUNLOCK(elf); in getehdr()
47 if (elf->ed_ehdr == 0) in getehdr()
48 (void) _elf_cook(elf); in getehdr()
50 rc = elf->ed_ehdr; in getehdr()
51 ELFUNLOCK(elf); in getehdr()
58 elf32_getehdr(Elf * elf) in elf32_getehdr() argument
[all …]
H A Dgetphdr.c36 getphdr(Elf * elf, int class) in getphdr() argument
39 if (elf == 0) in getphdr()
41 ELFWLOCK(elf); in getphdr()
42 if (elf->ed_class != class) { in getphdr()
44 ELFUNLOCK(elf); in getphdr()
47 if (elf->ed_phdr == 0) in getphdr()
48 (void) _elf_cook(elf); in getphdr()
49 rc = elf->ed_phdr; in getphdr()
50 ELFUNLOCK(elf); in getphdr()
56 elf32_getphdr(Elf * elf) in elf32_getphdr() argument
[all …]
H A Dgetbase.c35 elf_getbase(Elf *elf) in elf_getbase() argument
38 if (elf == NULL) in elf_getbase()
40 ELFRLOCK(elf) in elf_getbase()
41 rc = elf->ed_baseoff; in elf_getbase()
42 ELFUNLOCK(elf) in elf_getbase()
55 _elf_getarhdrbase(Elf *elf) in _elf_getarhdrbase() argument
58 if (elf == NULL) in _elf_getarhdrbase()
60 ELFRLOCK(elf) in _elf_getarhdrbase()
61 if (elf->ed_parent == NULL) { in _elf_getarhdrbase()
63 ELFUNLOCK(elf); in _elf_getarhdrbase()
[all …]
H A Dar.c172 elf->ed_memlist = l; in _elf_armem()
208 if (j < elf->ed_arstrsz) in _elf_armem()
273 _elf_arinit(Elf * elf) in _elf_arinit() argument
303 elf->ed_arsym = mem; in _elf_arinit()
304 elf->ed_arsymsz = sz; in _elf_arinit()
310 if (_elf_vm(elf, (size_t)(mem - elf->ed_ident), in _elf_arinit()
313 if (elf->ed_vm == 0) { in _elf_arinit()
324 elf->ed_arstr = mem; in _elf_arinit()
325 elf->ed_arstrsz = sz; in _elf_arinit()
338 elf->ed_arsym = mem; in _elf_arinit()
[all …]

1234567