Searched refs:elfhdr (Results 1 – 7 of 7) sorted by relevance
/freebsd/contrib/file/src/ |
H A D | elfclass.h | 27 if (nbytes <= sizeof(elfhdr)) 31 (void)memcpy(&elfhdr, buf, sizeof elfhdr); 32 swap = (u.c[sizeof(int32_t) - 1] + 1) != elfhdr.e_ident[EI_DATA]; 34 type = elf_getu16(swap, elfhdr.e_type); 39 phnum = elf_getu16(swap, elfhdr.e_phnum); 44 CAST(off_t, elf_getu(swap, elfhdr.e_phoff)), phnum, 45 CAST(size_t, elf_getu16(swap, elfhdr.e_phentsize)), 52 phnum = elf_getu16(swap, elfhdr.e_phnum); 55 shnum = elf_getu16(swap, elfhdr.e_shnum); 59 CAST(off_t, elf_getu(swap, elfhdr.e_phoff)), phnum, [all …]
|
H A D | readelf.c | 1949 #undef elfhdr in file_tryelf() 1950 #define elfhdr elf32hdr in file_tryelf() macro 1955 #undef elfhdr in file_tryelf() 1956 #define elfhdr elf64hdr in file_tryelf() macro
|
/freebsd/usr.sbin/btxld/ |
H A D | elfh.c | 40 const struct elfh elfhdr = { variable 54 htole16(sizeof(elfhdr.e)), /* e_ehsize */ 55 htole16(sizeof(elfhdr.p[0])), /* e_phentsize */ 56 htole16(nitems(elfhdr.p)), /* e_phnum */ 57 htole16(sizeof(elfhdr.sh[0])), /* e_shentsize */ 58 htole16(nitems(elfhdr.sh)), /* e_shnum */ 64 htole32(sizeof(elfhdr)), /* p_offset */ 93 htole32(sizeof(elfhdr.shstrtab)), /* sh_size */
|
H A D | elfh.h | 38 extern const struct elfh elfhdr; /* ELF header template */
|
H A D | btxld.c | 417 eh = elfhdr; in puthdr()
|
/freebsd/contrib/elftoolchain/size/ |
H A D | size.c | 244 xlatetom(Elf *elf, GElf_Ehdr *elfhdr, void *_src, void *_dst, in xlatetom() argument 251 src.d_version = elfhdr->e_version; in xlatetom() 254 dst.d_version = elfhdr->e_version; in xlatetom() 256 return (gelf_xlatetom(elf, &dst, &src, elfhdr->e_ident[EI_DATA]) != in xlatetom() 276 #define NEXT_NOTE(elfhdr, descsz, namesz, offset) do { \ argument 277 if (elfhdr->e_ident[EI_CLASS] == ELFCLASS32) { \ 292 handle_core_note(Elf *elf, GElf_Ehdr *elfhdr, GElf_Phdr *phdr, in handle_core_note() argument 304 if (elf == NULL || elfhdr == NULL || phdr == NULL) in handle_core_note() 318 if (xlatetom(elf, elfhdr, &nhdr->n_type, &nhdr_l.n_type, in handle_core_note() 320 xlatetom(elf, elfhdr, &nhdr->n_descsz, &nhdr_l.n_descsz, in handle_core_note() [all …]
|
/freebsd/contrib/elftoolchain/strings/ |
H A D | strings.c | 264 GElf_Ehdr elfhdr; in handle_elf() local 286 if (gelf_getehdr(elf, &elfhdr) == NULL) { in handle_elf() 292 if (elfhdr.e_shnum == 0 && elfhdr.e_type == ET_CORE) { in handle_elf()
|