/illumos-gate/usr/src/cmd/sgs/liblddbg/common/ |
H A D | elf.c | 33 Elf_ehdr(Lm_list *lml, Ehdr *ehdr, Shdr *shdr0) in Elf_ehdr() argument 103 if ((xshdr == 0) || (shdr0 == NULL)) in Elf_ehdr() 111 dbg_print(lml, MSG_ORIG(MSG_SHD0_ADDR), EC_ADDR(shdr0->sh_addr), in Elf_ehdr() 112 conv_sec_flags(osabi, mach, shdr0->sh_flags, 0, &sec_flags_buf)); in Elf_ehdr() 113 dbg_print(lml, MSG_ORIG(MSG_SHD0_SIZE), EC_XWORD(shdr0->sh_size), in Elf_ehdr() 114 conv_sec_type(osabi, mach, shdr0->sh_type, 0, &inv_buf1)); in Elf_ehdr() 115 dbg_print(lml, MSG_ORIG(MSG_SHD0_OFFSET), EC_OFF(shdr0->sh_offset), in Elf_ehdr() 116 EC_XWORD(shdr0->sh_entsize)); in Elf_ehdr() 117 dbg_print(lml, MSG_ORIG(MSG_SHD0_LINK), EC_WORD(shdr0->sh_link), in Elf_ehdr() 118 EC_WORD(shdr0->sh_info)); in Elf_ehdr() [all …]
|
/illumos-gate/usr/src/cmd/sgs/libelf/common/ |
H A D | getphnum.c | 51 GElf_Shdr shdr0; in elf_getphdrnum() local 62 gelf_getshdr(scn, &shdr0) == NULL) in elf_getphdrnum() 65 if (shdr0.sh_info == 0) in elf_getphdrnum() 68 *phnum = shdr0.sh_info; in elf_getphdrnum()
|
H A D | getshstrndx.c | 49 GElf_Shdr shdr0; in elf_getshdrstrndx() local 59 if (gelf_getshdr(scn, &shdr0) == 0) in elf_getshdrstrndx() 61 *shstrndx = shdr0.sh_link; in elf_getshdrstrndx()
|
H A D | getshnum.c | 55 GElf_Shdr shdr0; in elf_getshdrnum() local 69 if (gelf_getshdr(scn, &shdr0) == 0) in elf_getshdrnum() 71 *shnum = shdr0.sh_size; in elf_getshdrnum()
|
/illumos-gate/usr/src/cmd/sgs/libelf/demo/ |
H A D | dcom.c | 271 GElf_Shdr shdr0; in delete_comment() local 283 if (gelf_getshdr(_scn, &shdr0) == NULL) { in delete_comment() 290 shdr0.sh_link = shndx[shstrndx]; in delete_comment() 291 (void) gelf_update_shdr(_scn, &shdr0); in delete_comment()
|
/illumos-gate/usr/src/cmd/sgs/elfedit/modules/common/ |
H A D | ehdr.c | 997 Shdr *shdr0 = sec0->sec_shdr; in cmd_body() local 1020 if (shdr0->sh_info == sh_info) { in cmd_body() 1024 EC_WORD(shdr0->sh_info)); in cmd_body() 1029 EC_WORD(shdr0->sh_info), sh_info); in cmd_body() 1031 shdr0->sh_info = sh_info; in cmd_body() 1069 Shdr *shdr0 = sec0->sec_shdr; in cmd_body() local 1092 if (shdr0->sh_size == sh_size) { in cmd_body() 1096 EC_WORD(shdr0->sh_size)); in cmd_body() 1101 EC_WORD(shdr0->sh_size), sh_size); in cmd_body() 1103 shdr0->sh_size = sh_size; in cmd_body() [all …]
|
/illumos-gate/usr/src/cmd/sgs/dump/common/ |
H A D | dump.c | 1403 GElf_Shdr shdr0; in dump_elf_header() local 1428 if (gelf_getshdr(scn, &shdr0) == 0) { in dump_elf_header() 1434 (void) printf("[0]\t%u\t%llu\t", EC_WORD(shdr0.sh_type), in dump_elf_header() 1435 EC_XWORD(shdr0.sh_flags)); in dump_elf_header() 1438 field, EC_ADDR(shdr0.sh_addr), in dump_elf_header() 1439 field, EC_OFF(shdr0.sh_offset), in dump_elf_header() 1440 field, EC_XWORD(shdr0.sh_size), in dump_elf_header() 1443 field, EC_WORD(shdr0.sh_name)); in dump_elf_header() 1446 EC_WORD(shdr0.sh_link), in dump_elf_header() 1447 EC_WORD(shdr0.sh_info), in dump_elf_header() [all …]
|
/illumos-gate/usr/src/cmd/mdb/common/mdb/ |
H A D | mdb_gelf.c | 609 Elf32_Shdr shdr0; in gelf32_init() local 619 if (IOP_READ(io, &shdr0, sizeof (shdr0)) != sizeof (shdr0)) { in gelf32_init() 626 gf->gf_shnum = shdr0.sh_size; in gelf32_init() 629 gf->gf_shstrndx = shdr0.sh_link; in gelf32_init() 632 gf->gf_phnum = shdr0.sh_info; in gelf32_init() 668 Elf64_Shdr shdr0; in gelf64_init() local 678 if (IOP_READ(io, &shdr0, sizeof (shdr0)) != sizeof (shdr0)) { in gelf64_init() 685 gf->gf_shnum = shdr0.sh_size; in gelf64_init() 688 gf->gf_shstrndx = shdr0.sh_link; in gelf64_init() 691 gf->gf_phnum = shdr0.sh_info; in gelf64_init()
|
/illumos-gate/usr/src/lib/libproc/common/ |
H A D | Psymtab.c | 1071 Elf32_Shdr shdr0; in read_ehdr32() local 1073 if (ehdr->e_shoff == 0 || ehdr->e_shentsize < sizeof (shdr0) || in read_ehdr32() 1074 Pread(P, &shdr0, sizeof (shdr0), addr + ehdr->e_shoff) != in read_ehdr32() 1075 sizeof (shdr0)) in read_ehdr32() 1078 if (shdr0.sh_info != 0) in read_ehdr32() 1079 *phnum = shdr0.sh_info; in read_ehdr32() 1125 Elf64_Shdr shdr0; in read_ehdr64() local 1127 if (ehdr->e_shoff == 0 || ehdr->e_shentsize < sizeof (shdr0) || in read_ehdr64() 1128 Pread(P, &shdr0, sizeof (shdr0), addr + ehdr->e_shoff) != in read_ehdr64() 1129 sizeof (shdr0)) in read_ehdr64() [all …]
|
/illumos-gate/usr/src/cmd/sgs/librtld/common/ |
H A D | dldump.c | 642 Shdr *shdr0; in rt_dldump() local 656 shdr0 = elf_getshdr(_scn); in rt_dldump() 657 shdr0->sh_link = elf_ndxscn(scn); in rt_dldump()
|
/illumos-gate/usr/src/uts/common/exec/elf/ |
H A D | elf.c | 2087 Shdr shdr0; in elfcore() local 2184 bzero(&shdr0, sizeof (shdr0)); in elfcore() 2195 shdr0.sh_info = nphdrs; in elfcore() 2203 shdr0.sh_size = nshdrs; in elfcore() 2210 shdr0.sh_link = nshdrs - 1; in elfcore() 2542 bcopy(&shdr0, shdr, sizeof (shdr0)); in elfcore()
|
/illumos-gate/usr/src/cmd/sgs/mcs/common/ |
H A D | file.c | 1157 GElf_Shdr shdr0; in build_file() local 1169 (void) gelf_getshdr(_scn, &shdr0); in build_file() 1170 shdr0.sh_link = state->sec_table[shstrndx].secno; in build_file() 1171 (void) gelf_update_shdr(_scn, &shdr0); in build_file()
|
/illumos-gate/usr/src/cmd/sgs/libld/common/ |
H A D | files.c | 118 Shdr *shdr0; in ifl_setup() local 125 if ((shdr0 = elf_getshdr(scn)) == NULL) { in ifl_setup() 130 ifl->ifl_shnum = (Word)shdr0->sh_size; in ifl_setup() 132 ifl->ifl_shstrndx = shdr0->sh_link; in ifl_setup()
|
H A D | update.c | 4592 Shdr *shdr0; in ld_update_outfile() local 4599 if ((shdr0 = elf_getshdr(scn)) == NULL) { in ld_update_outfile() 4605 shdr0->sh_link = shscnndx; in ld_update_outfile()
|