Searched refs:ehdr (Results 1 - 25 of 105) sorted by relevance

12345

/illumos-gate/usr/src/tools/btxld/
H A Delfh.h32 #define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
33 (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
34 (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
35 (ehdr).e_ident[EI_MAG3] == ELFMAG3)
/illumos-gate/usr/src/cmd/sgs/libelf/common/
H A Dgetshnum.c53 GElf_Ehdr ehdr; local
57 if (gelf_getehdr(elf, &ehdr) == 0)
59 if (ehdr.e_shnum > 0) {
60 *shnum = ehdr.e_shnum;
63 if ((ehdr.e_shnum == 0) && (ehdr.e_shoff == 0)) {
H A Dgetphnum.c49 GElf_Ehdr ehdr; local
53 if (gelf_getehdr(elf, &ehdr) == NULL)
56 if (ehdr.e_phnum != PN_XNUM) {
57 *phnum = ehdr.e_phnum;
66 *phnum = ehdr.e_phnum;
H A Dgetshstrndx.c47 GElf_Ehdr ehdr; local
51 if (gelf_getehdr(elf, &ehdr) == 0)
53 if (ehdr.e_shstrndx != SHN_XINDEX) {
54 *shstrndx = ehdr.e_shstrndx;
H A Dchecksum.c104 Elf_Ehdr * ehdr; local
110 if ((ehdr = getehdr(elf)) == 0)
132 for (shnum = 1; shnum < ehdr->e_shnum; shnum++) {
/illumos-gate/usr/src/cmd/sgs/liblddbg/common/
H A Delf.c33 Elf_ehdr(Lm_list *lml, Ehdr *ehdr, Shdr *shdr0) argument
38 Byte *byte = &(ehdr->e_ident[0]);
41 uchar_t osabi = ehdr->e_ident[EI_OSABI];
42 Half mach = ehdr->e_machine;
52 conv_ehdr_class(ehdr->e_ident[EI_CLASS], 0, &inv_buf1),
53 conv_ehdr_data(ehdr->e_ident[EI_DATA], 0, &inv_buf2));
55 conv_ehdr_osabi(ehdr->e_ident[EI_OSABI], 0, &inv_buf1),
56 conv_ehdr_abivers(ehdr->e_ident[EI_OSABI],
57 ehdr->e_ident[EI_ABIVERSION], CONV_FMT_DECIMAL, &inv_buf2));
60 conv_ehdr_vers(ehdr
[all...]
/illumos-gate/usr/src/cmd/mdb/tools/common/
H A Dfindscn.c39 GElf_Ehdr ehdr; local
42 if (gelf_getehdr(elf, &ehdr) == NULL)
49 (name = elf_strptr(elf, ehdr.e_shstrndx,
/illumos-gate/usr/src/lib/libproc/common/
H A DPsymtab_machelf.h37 uintptr_t addr, Elf32_Ehdr *ehdr, uint_t phnum, Elf32_Phdr *phdr);
40 uintptr_t addr, Elf64_Ehdr *ehdr, uint_t phnum, Elf64_Phdr *phdr);
H A DPgcore.c1101 Elf32_Ehdr ehdr; local
1103 bzero(&ehdr, sizeof (ehdr));
1104 ehdr.e_ident[EI_MAG0] = ELFMAG0;
1105 ehdr.e_ident[EI_MAG1] = ELFMAG1;
1106 ehdr.e_ident[EI_MAG2] = ELFMAG2;
1107 ehdr.e_ident[EI_MAG3] = ELFMAG3;
1108 ehdr.e_type = ET_CORE;
1110 ehdr.e_ident[EI_CLASS] = ELFCLASS32;
1112 ehdr
1159 Elf64_Ehdr ehdr; local
[all...]
/illumos-gate/usr/src/lib/libc/sparc/crt/
H A D_rtld.c82 Elf32_Ehdr *ehdr; /* ELF header of ld.so */ local
138 ehdr = (Elf32_Ehdr *)MMAP(0, sb.st_size, PROT_READ | PROT_EXEC,
140 if (ehdr == (Elf32_Ehdr *)-1)
148 if (ehdr->e_ident[EI_MAG0] != ELFMAG0 ||
149 ehdr->e_ident[EI_MAG1] != ELFMAG1 ||
150 ehdr->e_ident[EI_MAG2] != ELFMAG2 ||
151 ehdr->e_ident[EI_MAG3] != ELFMAG3)
153 if (ehdr->e_ident[EI_CLASS] != ELFCLASS32 ||
154 ehdr->e_ident[EI_DATA] != ELFDATA2MSB)
156 if (ehdr
[all...]
/illumos-gate/usr/src/lib/libc/i386/crt/
H A D_rtld.c83 Elf32_Ehdr *ehdr; /* ELF header of ld.so */ local
139 ehdr = (Elf32_Ehdr *)MMAP(0, sb.st_size, PROT_READ | PROT_EXEC,
141 if (ehdr == (Elf32_Ehdr *)-1)
149 if (ehdr->e_ident[EI_MAG0] != ELFMAG0 ||
150 ehdr->e_ident[EI_MAG1] != ELFMAG1 ||
151 ehdr->e_ident[EI_MAG2] != ELFMAG2 ||
152 ehdr->e_ident[EI_MAG3] != ELFMAG3)
154 if (ehdr->e_ident[EI_CLASS] != ELFCLASS32 ||
155 ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
157 if (ehdr
[all...]
/illumos-gate/usr/src/cmd/sgs/elfedit/modules/common/
H A Dehdr.c53 EHDR_CMD_T_DUMP = 0, /* ehdr:dump */
56 EHDR_CMD_T_E_IDENT = 1, /* ehdr:e_ident */
57 EHDR_CMD_T_E_TYPE = 2, /* ehdr:e_type */
58 EHDR_CMD_T_E_MACHINE = 3, /* ehdr:e_machine */
59 EHDR_CMD_T_E_VERSION = 4, /* ehdr:e_version */
60 EHDR_CMD_T_E_ENTRY = 5, /* ehdr:e_entry */
61 EHDR_CMD_T_E_PHOFF = 6, /* ehdr:e_phoff */
62 EHDR_CMD_T_E_SHOFF = 7, /* ehdr:e_shoff */
63 EHDR_CMD_T_E_FLAGS = 8, /* ehdr:e_flags */
64 EHDR_CMD_T_E_EHSIZE = 9, /* ehdr
243 Ehdr *ehdr; local
672 Ehdr *ehdr; local
[all...]
/illumos-gate/usr/src/cmd/mdb/common/modules/krtld/
H A Dkrtld.c143 dump_ehdr(const Ehdr *ehdr) argument
148 ehdr->e_ident[EI_MAG0], ehdr->e_ident[EI_MAG1],
149 ehdr->e_ident[EI_MAG2], ehdr->e_ident[EI_MAG3]);
152 ehdr->e_ident[EI_CLASS], ehdr->e_ident[EI_DATA]);
155 ehdr->e_machine, ehdr->e_version);
157 mdb_printf(" e_type: %-18hu\n", ehdr
[all...]
/illumos-gate/usr/src/boot/sys/boot/i386/libi386/
H A Delf64_freebsd.c75 Elf_Ehdr *ehdr; local
82 ehdr = (Elf_Ehdr *)&(md->md_data);
110 entry_lo = ehdr->e_entry & 0xffffffff;
111 entry_hi = (ehdr->e_entry >> 32) & 0xffffffff;
113 printf("Start @ %#llx ...\n", ehdr->e_entry);
H A Delf32_freebsd.c57 Elf_Ehdr *ehdr; local
63 ehdr = (Elf_Ehdr *)&(md->md_data);
68 entry = ehdr->e_entry & 0xffffff;
/illumos-gate/usr/src/cmd/sgs/ld/common/
H A Dld.c68 * header is fixed by the ELF ABI. Hence, the ehdr part of this union is
81 } ehdr; member in union:__anon1666
198 Elf64_Ehdr *ehdr; local
200 if ((ehdr = elf64_getehdr(_elf)) ==
203 *class_ret = ehdr->e_ident[EI_CLASS];
204 *mach_ret = ehdr->e_machine;
206 Elf32_Ehdr *ehdr; local
208 if ((ehdr = elf32_getehdr(_elf)) ==
211 *class_ret = ehdr->e_ident[EI_CLASS];
212 *mach_ret = ehdr
[all...]
/illumos-gate/usr/src/tools/ctf/cvt/
H A Dutil.c67 GElf_Ehdr ehdr; local
70 if (gelf_getehdr(elf, &ehdr) == NULL)
71 elfterminate(file, "Couldn't read ehdr");
82 if ((name = elf_strptr(elf, ehdr.e_shstrndx,
99 GElf_Ehdr ehdr; local
101 if (gelf_getehdr(elf, &ehdr) == NULL) {
106 if (ehdr.e_ident[EI_CLASS] == ELFCLASS32)
108 else if (ehdr.e_ident[EI_CLASS] == ELFCLASS64)
111 terminate("unknown ELF class %d\n", ehdr.e_ident[EI_CLASS]);
/illumos-gate/usr/src/boot/sys/boot/common/
H A Dload_elf.c55 Elf_Ehdr *ehdr; member in struct:elf_file
93 Elf_Ehdr *ehdr; local
114 ehdr = ef->ehdr = (Elf_Ehdr *)ef->firstpage;
117 if (!IS_ELF(*ehdr)) {
121 if (ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS || /* Layout ? */
122 ehdr->e_ident[EI_DATA] != ELF_TARG_DATA ||
123 ehdr->e_ident[EI_VERSION] != EV_CURRENT || /* Version ? */
124 ehdr->e_version != EV_CURRENT ||
125 ehdr
161 Elf_Ehdr *ehdr; local
300 Elf_Ehdr *ehdr; local
[all...]
/illumos-gate/usr/src/boot/sys/boot/efi/loader/arch/i386/
H A Delf32_freebsd.c66 Elf_Ehdr *ehdr; local
72 ehdr = (Elf_Ehdr *)&(md->md_data);
77 entry = ehdr->e_entry & 0xffffff;
/illumos-gate/usr/src/cmd/sgs/rtld.4.x/
H A Drtld.4.x.c223 Elf32_Ehdr *ehdr; /* ELF header of ld.so */ local
382 ehdr = (Elf32_Ehdr *)mmap(0, sb.st_size, PROT_READ | PROT_EXEC,
384 if (ehdr == (Elf32_Ehdr *)-1)
392 if (ehdr->e_ident[EI_MAG0] != ELFMAG0 ||
393 ehdr->e_ident[EI_MAG1] != ELFMAG1 ||
394 ehdr->e_ident[EI_MAG2] != ELFMAG2 ||
395 ehdr->e_ident[EI_MAG3] != ELFMAG3)
397 if (ehdr->e_ident[EI_CLASS] != ELFCLASS32 ||
398 ehdr->e_ident[EI_DATA] != ELFDATA2MSB)
400 if (ehdr
[all...]
/illumos-gate/usr/src/uts/common/fs/objfs/
H A Dobjfs_data.c600 Elf64_Ehdr ehdr; local
602 Elf32_Ehdr ehdr;
605 bzero(&ehdr, sizeof (ehdr));
607 bcopy(ELFMAG, ehdr.e_ident, SELFMAG);
609 ehdr.e_ident[EI_DATA] = ELFDATA2MSB;
611 ehdr.e_ident[EI_DATA] = ELFDATA2LSB;
613 ehdr.e_ident[EI_VERSION] = EV_CURRENT;
616 ehdr.e_ident[EI_CLASS] = ELFCLASS64;
617 ehdr
[all...]
/illumos-gate/usr/src/cmd/sgs/dump/common/
H A Dfcns.c86 GElf_Ehdr ehdr; local
108 if ((gelf_getehdr(elf_file, &ehdr) == 0) || (ehdr.e_phnum == 0)) {
136 conv_phdr_type(ehdr.e_ident[EI_OSABI],
137 ehdr.e_machine, p_phdr.p_type, DUMP_CONVFMT,
/illumos-gate/usr/src/cmd/sgs/ldd/common/
H A Dldd.c398 GElf_Ehdr ehdr; local
405 if (gelf_getehdr(elf, &ehdr) == NULL) {
414 if ((ehdr.e_machine != M_MACH_32) && (ehdr.e_machine != M_MACH_64) &&
415 (ehdr.e_machine != M_MACHPLUS)) {
417 conv_ehdr_mach(ehdr.e_machine, 0, &inv_buf));
424 if (ehdr.e_ident[EI_DATA] != M_DATA) {
426 conv_ehdr_data(ehdr.e_ident[EI_DATA], 0, &inv_buf));
433 switch (class = ehdr.e_ident[EI_CLASS]) {
440 if ((ehdr
[all...]
/illumos-gate/usr/src/cmd/dis/
H A Ddis_main.c479 GElf_Ehdr ehdr; local
495 dis_tgt_ehdr(current, &ehdr);
503 switch (ehdr.e_machine) {
505 if (ehdr.e_ident[EI_CLASS] != ELFCLASS32 ||
506 ehdr.e_ident[EI_DATA] != ELFDATA2MSB) {
515 uint64_t flags = ehdr.e_flags & EF_SPARC_32PLUS_MASK;
517 if (ehdr.e_ident[EI_CLASS] != ELFCLASS32 ||
518 ehdr.e_ident[EI_DATA] != ELFDATA2MSB) {
533 if (ehdr.e_ident[EI_CLASS] != ELFCLASS64 ||
534 ehdr
[all...]
/illumos-gate/usr/src/cmd/sgs/librtld_db/i386/
H A Dplt32_resolution.c54 Ehdr ehdr; local
70 if (ps_pread(rap->rd_psp, rl->rl_base, (char *)&ehdr,
77 if (ehdr.e_type == ET_EXEC)
82 off = rl->rl_base + ehdr.e_phoff;
83 for (i = 0; i < ehdr.e_phnum; i++) {
100 off += ehdr.e_phentsize;

Completed in 183 milliseconds

12345