Lines Matching defs:ehdr

299 static void print_ehdr (Ebl *ebl, GElf_Ehdr *ehdr);
300 static void print_shdr (Ebl *ebl, GElf_Ehdr *ehdr);
301 static void print_phdr (Ebl *ebl, GElf_Ehdr *ehdr);
304 static void print_relocs (Ebl *ebl, GElf_Ehdr *ehdr);
305 static void handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn,
307 static void handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn,
316 static void print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr);
318 static void handle_notes (Ebl *ebl, GElf_Ehdr *ehdr);
320 static void print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr);
962 GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
964 if (ehdr == NULL)
997 && (ehdr->e_type == ET_REL
1026 print_ehdr (ebl, ehdr);
1028 print_shdr (pure_ebl, ehdr);
1030 print_phdr (ebl, ehdr);
1036 print_relocs (pure_ebl, ehdr);
1048 print_attributes (ebl, ehdr);
1054 print_debug (dwflmod, ebl, ehdr);
1056 handle_notes (pure_ebl, ehdr);
1097 print_ehdr (Ebl *ebl, GElf_Ehdr *ehdr)
1101 printf (" %02hhx", ehdr->e_ident[cnt]);
1104 ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? "ELF32"
1105 : ehdr->e_ident[EI_CLASS] == ELFCLASS64 ? "ELF64"
1109 ehdr->e_ident[EI_DATA] == ELFDATA2LSB
1111 : ehdr->e_ident[EI_DATA] == ELFDATA2MSB
1115 ehdr->e_ident[EI_VERSION],
1116 ehdr->e_ident[EI_VERSION] == EV_CURRENT ? _("(current)")
1121 ebl_osabi_name (ebl, ehdr->e_ident[EI_OSABI], buf, sizeof (buf)));
1124 ehdr->e_ident[EI_ABIVERSION]);
1127 print_file_type (ehdr->e_type);
1129 const char *machine = dwelf_elf_e_machine_string (ehdr->e_machine);
1134 ehdr->e_machine);
1137 ehdr->e_version,
1138 ehdr->e_version == EV_CURRENT ? _("(current)") : "(\?\?\?)");
1141 ehdr->e_entry);
1144 ehdr->e_phoff, _("(bytes into file)"));
1147 ehdr->e_shoff, _("(bytes into file)"));
1150 ebl_machine_flag_name (ebl, ehdr->e_flags, buf, sizeof (buf)));
1153 ehdr->e_ehsize, _("(bytes)"));
1156 ehdr->e_phentsize, _("(bytes)"));
1159 ehdr->e_phnum);
1160 if (ehdr->e_phnum == PN_XNUM)
1173 ehdr->e_shentsize, _("(bytes)"));
1176 ehdr->e_shnum);
1177 if (ehdr->e_shnum == 0)
1189 if (unlikely (ehdr->e_shstrndx == SHN_XINDEX))
1208 ehdr->e_shstrndx);
1244 print_shdr (Ebl *ebl, GElf_Ehdr *ehdr)
1259 sections, ehdr->e_shoff);
1269 if (ehdr->e_ident[EI_CLASS] == ELFCLASS32)
1276 if (ehdr->e_ident[EI_CLASS] == ELFCLASS32)
1337 ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 8 : 16, shdr->sh_addr,
1338 ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 6 : 8, shdr->sh_offset,
1339 ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 6 : 8, shdr->sh_size,
1353 ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 6 : 8,
1365 ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 6 : 8, size);
1380 print_phdr (Ebl *ebl, GElf_Ehdr *ehdr)
1387 if (ehdr->e_ident[EI_CLASS] == ELFCLASS32)
1415 ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 8 : 16, phdr->p_vaddr,
1416 ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 8 : 16, phdr->p_paddr,
2022 print_relocs (Ebl *ebl, GElf_Ehdr *ehdr)
2036 handle_relocs_rel (ebl, ehdr, scn, shdr);
2038 handle_relocs_rela (ebl, ehdr, scn, shdr);
2046 handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
2140 if (ehdr->e_type == ET_EXEC)
2235 handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
2330 if (ehdr->e_type == ET_EXEC)
3656 print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr)
3674 || ehdr->e_machine != EM_ARM)
3676 || ehdr->e_machine != EM_CSKY)
3678 || ehdr->e_machine != EM_RISCV)))
3707 if (MY_ELFDATA != ehdr->e_ident[EI_DATA])
3745 if (MY_ELFDATA != ehdr->e_ident[EI_DATA])
5255 Ebl *ebl, GElf_Ehdr *ehdr __attribute__ ((unused)),
5328 Ebl *ebl, GElf_Ehdr *ehdr,
5384 address_size = ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8;
5554 print_decoded_aranges_section (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn,
5612 digits, n, ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 10 : 18,
5621 Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn,
5626 print_decoded_aranges_section (ebl, ehdr, scn, shdr, dbg);
5803 GElf_Ehdr *ehdr __attribute__ ((unused)),
6179 Ebl *ebl, GElf_Ehdr *ehdr,
6200 uint_fast8_t address_size = ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8;
6399 Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, Dwarf *dbg)
6621 if (ehdr->e_machine == EM_AARCH64)
6774 print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
6862 unsigned int ptr_size = ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8;
6922 readp += ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8;
7155 fde_encoding, dwflmod, ebl, ehdr, dbg);
7892 Ebl *ebl, GElf_Ehdr *ehdr __attribute__ ((unused)),
8178 print_debug_info_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
8181 print_debug_units (dwflmod, ebl, ehdr, scn, shdr, dbg, false);
8185 print_debug_types_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
8188 print_debug_units (dwflmod, ebl, ehdr, scn, shdr, dbg, true);
8194 GElf_Ehdr *ehdr __attribute__ ((unused)),
8554 print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
8559 print_decoded_line_section (dwflmod, ebl, ehdr, scn, shdr, dbg);
9305 GElf_Ehdr *ehdr __attribute__ ((unused)),
9779 Ebl *ebl, GElf_Ehdr *ehdr,
9800 uint_fast8_t address_size = ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8;
10040 GElf_Ehdr *ehdr __attribute__ ((unused)),
10206 GElf_Ehdr *ehdr __attribute__ ((unused)),
10593 GElf_Ehdr *ehdr __attribute__ ((unused)),
10608 GElf_Ehdr *ehdr __attribute__ ((unused)),
10653 GElf_Ehdr *ehdr __attribute__ ((unused)),
10844 GElf_Ehdr *ehdr __attribute__ ((unused)),
10944 GElf_Ehdr *ehdr __attribute__ ((unused)),
11123 GElf_Ehdr *ehdr __attribute__ ((unused)),
11419 print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
11434 .other_byte_order = MY_ELFDATA != ehdr->e_ident[EI_DATA]
11611 print_debug_info_section (dwflmod, ebl, ehdr,
11703 debug_sections[n].fp (dwflmod, ebl, ehdr, scn, shdr, dbg);
11994 GElf_Ehdr *ehdr = gelf_getehdr (core, &ehdr_mem);
11995 if (likely (ehdr->e_ident[EI_DATA] == ELFDATA2MSB))
12675 handle_notes_data (Ebl *ebl, const GElf_Ehdr *ehdr,
12708 ehdr->e_type == ET_CORE
12720 if (ehdr->e_type == ET_CORE)
12763 handle_notes (Ebl *ebl, GElf_Ehdr *ehdr)
12797 handle_notes_data (ebl, ehdr, shdr->sh_offset,
12818 handle_notes_data (ebl, ehdr, phdr->p_offset,