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()
234 /* elf ABI allows only one interpreter */ in load_elf_fdpic_binary()
263 kdebug("Using ELF interpreter %s", interpreter_name); in load_elf_fdpic_binary()
494 * If the arch defines ELF_BASE_PLATFORM (in asm/elf.h), the value
621 /* Create the ELF interpreter info */ in create_elf_fdpic_tables()
925 printk("ELF FDPIC %s with invalid DYNAMIC section (inode=%llu)\n", in elf_fdpic_map_file()
985 /* map the ELF header address if in this segment */ in elf_fdpic_map_file_constdisp_on_uclinux()
1115 /* map the ELF header address if in this segment */ in elf_fdpic_map_file_by_direct_mmap()
1193 * ELF-FDPIC core dumper
1217 /* An ELF note in memory */
1251 static inline void fill_elf_fdpic_header(struct elfhdr *elf, int segs) in fill_elf_fdpic_header() argument
1253 memcpy(elf->e_ident, ELFMAG, SELFMAG); in fill_elf_fdpic_header()
1254 elf->e_ident[EI_CLASS] = ELF_CLASS; in fill_elf_fdpic_header()
1255 elf->e_ident[EI_DATA] = ELF_DATA; in fill_elf_fdpic_header()
1256 elf->e_ident[EI_VERSION] = EV_CURRENT; in fill_elf_fdpic_header()
1257 elf->e_ident[EI_OSABI] = ELF_OSABI; in fill_elf_fdpic_header()
1258 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in fill_elf_fdpic_header()
1260 elf->e_type = ET_CORE; in fill_elf_fdpic_header()
1261 elf->e_machine = ELF_ARCH; in fill_elf_fdpic_header()
1262 elf->e_version = EV_CURRENT; in fill_elf_fdpic_header()
1263 elf->e_entry = 0; in fill_elf_fdpic_header()
1264 elf->e_phoff = sizeof(struct elfhdr); in fill_elf_fdpic_header()
1265 elf->e_shoff = 0; in fill_elf_fdpic_header()
1266 elf->e_flags = ELF_FDPIC_CORE_EFLAGS; in fill_elf_fdpic_header()
1267 elf->e_ehsize = sizeof(struct elfhdr); in fill_elf_fdpic_header()
1268 elf->e_phentsize = sizeof(struct elf_phdr); in fill_elf_fdpic_header()
1269 elf->e_phnum = segs; in fill_elf_fdpic_header()
1270 elf->e_shentsize = 0; in fill_elf_fdpic_header()
1271 elf->e_shnum = 0; in fill_elf_fdpic_header()
1272 elf->e_shstrndx = 0; in fill_elf_fdpic_header()
1395 * In order to add the specific thread information for the elf file format,
1439 static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum, in fill_extnum_info() argument
1442 elf->e_shoff = e_shoff; in fill_extnum_info()
1443 elf->e_shentsize = sizeof(*shdr4extnum); in fill_extnum_info()
1444 elf->e_shnum = 1; in fill_extnum_info()
1445 elf->e_shstrndx = SHN_UNDEF; in fill_extnum_info()
1450 shdr4extnum->sh_size = elf->e_shnum; in fill_extnum_info()
1451 shdr4extnum->sh_link = elf->e_shstrndx; in fill_extnum_info()
1485 struct elfhdr *elf = NULL; in elf_fdpic_core_dump() local
1500 elf = kmalloc_obj(*elf); in elf_fdpic_core_dump()
1501 if (!elf) in elf_fdpic_core_dump()
1533 * include/linux/elf.h for further information. */ in elf_fdpic_core_dump()
1537 fill_elf_fdpic_header(elf, e_phnum); in elf_fdpic_core_dump()
1557 offset = sizeof(*elf); /* ELF header */ in elf_fdpic_core_dump()
1579 fill_extnum_info(elf, shdr4extnum, e_shoff, segs); in elf_fdpic_core_dump()
1584 if (!dump_emit(cprm, elf, sizeof(*elf))) in elf_fdpic_core_dump()
1666 kfree(elf); in elf_fdpic_core_dump()