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()
486 * If the arch defines ELF_BASE_PLATFORM (in asm/elf.h), the value
608 /* Create the ELF interpreter info */ in create_elf_fdpic_tables()
914 printk("ELF FDPIC %s with invalid DYNAMIC section (inode=%lu)\n", in elf_fdpic_map_file()
974 /* map the ELF header address if in this segment */ in elf_fdpic_map_file_constdisp_on_uclinux()
1104 /* map the ELF header address if in this segment */ in elf_fdpic_map_file_by_direct_mmap()
1182 * ELF-FDPIC core dumper
1206 /* An ELF note in memory */
1240 static inline void fill_elf_fdpic_header(struct elfhdr *elf, int segs) in fill_elf_fdpic_header() argument
1242 memcpy(elf->e_ident, ELFMAG, SELFMAG); in fill_elf_fdpic_header()
1243 elf->e_ident[EI_CLASS] = ELF_CLASS; in fill_elf_fdpic_header()
1244 elf->e_ident[EI_DATA] = ELF_DATA; in fill_elf_fdpic_header()
1245 elf->e_ident[EI_VERSION] = EV_CURRENT; in fill_elf_fdpic_header()
1246 elf->e_ident[EI_OSABI] = ELF_OSABI; in fill_elf_fdpic_header()
1247 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in fill_elf_fdpic_header()
1249 elf->e_type = ET_CORE; in fill_elf_fdpic_header()
1250 elf->e_machine = ELF_ARCH; in fill_elf_fdpic_header()
1251 elf->e_version = EV_CURRENT; in fill_elf_fdpic_header()
1252 elf->e_entry = 0; in fill_elf_fdpic_header()
1253 elf->e_phoff = sizeof(struct elfhdr); in fill_elf_fdpic_header()
1254 elf->e_shoff = 0; in fill_elf_fdpic_header()
1255 elf->e_flags = ELF_FDPIC_CORE_EFLAGS; in fill_elf_fdpic_header()
1256 elf->e_ehsize = sizeof(struct elfhdr); in fill_elf_fdpic_header()
1257 elf->e_phentsize = sizeof(struct elf_phdr); in fill_elf_fdpic_header()
1258 elf->e_phnum = segs; in fill_elf_fdpic_header()
1259 elf->e_shentsize = 0; in fill_elf_fdpic_header()
1260 elf->e_shnum = 0; in fill_elf_fdpic_header()
1261 elf->e_shstrndx = 0; in fill_elf_fdpic_header()
1384 * In order to add the specific thread information for the elf file format,
1428 static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum, in fill_extnum_info() argument
1431 elf->e_shoff = e_shoff; in fill_extnum_info()
1432 elf->e_shentsize = sizeof(*shdr4extnum); in fill_extnum_info()
1433 elf->e_shnum = 1; in fill_extnum_info()
1434 elf->e_shstrndx = SHN_UNDEF; in fill_extnum_info()
1439 shdr4extnum->sh_size = elf->e_shnum; in fill_extnum_info()
1440 shdr4extnum->sh_link = elf->e_shstrndx; in fill_extnum_info()
1474 struct elfhdr *elf = NULL; in elf_fdpic_core_dump() local
1489 elf = kmalloc(sizeof(*elf), GFP_KERNEL); in elf_fdpic_core_dump()
1490 if (!elf) in elf_fdpic_core_dump()
1522 * include/linux/elf.h for further information. */ in elf_fdpic_core_dump()
1526 fill_elf_fdpic_header(elf, e_phnum); in elf_fdpic_core_dump()
1546 offset = sizeof(*elf); /* ELF header */ in elf_fdpic_core_dump()
1568 fill_extnum_info(elf, shdr4extnum, e_shoff, segs); in elf_fdpic_core_dump()
1573 if (!dump_emit(cprm, elf, sizeof(*elf))) in elf_fdpic_core_dump()
1655 kfree(elf); in elf_fdpic_core_dump()