Lines Matching full:elf
2 /* binfmt_elf_fdpic.c: FDPIC ELF binary format
33 #include <linux/elf.h>
34 #include <linux/elf-fdpic.h>
214 /* binfmt_elf handles non-fdpic elf except on nommu */ in load_elf_fdpic_binary()
217 /* nommu can only load ET_DYN (PIE) ELF */ in load_elf_fdpic_binary()
259 kdebug("Using ELF interpreter %s", interpreter_name); in load_elf_fdpic_binary()
483 * If the arch defines ELF_BASE_PLATFORM (in asm/elf.h), the value
605 /* Create the ELF interpreter info */ in create_elf_fdpic_tables()
905 printk("ELF FDPIC %s with invalid DYNAMIC section (inode=%lu)\n", in elf_fdpic_map_file()
965 /* map the ELF header address if in this segment */ in elf_fdpic_map_file_constdisp_on_uclinux()
1095 /* map the ELF header address if in this segment */ in elf_fdpic_map_file_by_direct_mmap()
1172 * ELF-FDPIC core dumper
1196 /* An ELF note in memory */
1230 static inline void fill_elf_fdpic_header(struct elfhdr *elf, int segs) in fill_elf_fdpic_header() argument
1232 memcpy(elf->e_ident, ELFMAG, SELFMAG); in fill_elf_fdpic_header()
1233 elf->e_ident[EI_CLASS] = ELF_CLASS; in fill_elf_fdpic_header()
1234 elf->e_ident[EI_DATA] = ELF_DATA; in fill_elf_fdpic_header()
1235 elf->e_ident[EI_VERSION] = EV_CURRENT; in fill_elf_fdpic_header()
1236 elf->e_ident[EI_OSABI] = ELF_OSABI; in fill_elf_fdpic_header()
1237 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in fill_elf_fdpic_header()
1239 elf->e_type = ET_CORE; in fill_elf_fdpic_header()
1240 elf->e_machine = ELF_ARCH; in fill_elf_fdpic_header()
1241 elf->e_version = EV_CURRENT; in fill_elf_fdpic_header()
1242 elf->e_entry = 0; in fill_elf_fdpic_header()
1243 elf->e_phoff = sizeof(struct elfhdr); in fill_elf_fdpic_header()
1244 elf->e_shoff = 0; in fill_elf_fdpic_header()
1245 elf->e_flags = ELF_FDPIC_CORE_EFLAGS; in fill_elf_fdpic_header()
1246 elf->e_ehsize = sizeof(struct elfhdr); in fill_elf_fdpic_header()
1247 elf->e_phentsize = sizeof(struct elf_phdr); in fill_elf_fdpic_header()
1248 elf->e_phnum = segs; in fill_elf_fdpic_header()
1249 elf->e_shentsize = 0; in fill_elf_fdpic_header()
1250 elf->e_shnum = 0; in fill_elf_fdpic_header()
1251 elf->e_shstrndx = 0; in fill_elf_fdpic_header()
1371 * In order to add the specific thread information for the elf file format,
1417 static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum, in fill_extnum_info() argument
1420 elf->e_shoff = e_shoff; in fill_extnum_info()
1421 elf->e_shentsize = sizeof(*shdr4extnum); in fill_extnum_info()
1422 elf->e_shnum = 1; in fill_extnum_info()
1423 elf->e_shstrndx = SHN_UNDEF; in fill_extnum_info()
1428 shdr4extnum->sh_size = elf->e_shnum; in fill_extnum_info()
1429 shdr4extnum->sh_link = elf->e_shstrndx; in fill_extnum_info()
1463 struct elfhdr *elf = NULL; in elf_fdpic_core_dump() local
1478 elf = kmalloc(sizeof(*elf), GFP_KERNEL); in elf_fdpic_core_dump()
1479 if (!elf) in elf_fdpic_core_dump()
1511 * include/linux/elf.h for further information. */ in elf_fdpic_core_dump()
1515 fill_elf_fdpic_header(elf, e_phnum); in elf_fdpic_core_dump()
1535 offset = sizeof(*elf); /* ELF header */ in elf_fdpic_core_dump()
1557 fill_extnum_info(elf, shdr4extnum, e_shoff, segs); in elf_fdpic_core_dump()
1562 if (!dump_emit(cprm, elf, sizeof(*elf))) in elf_fdpic_core_dump()
1644 kfree(elf); in elf_fdpic_core_dump()