Lines Matching defs:elf

33 #include <linux/elf.h>
34 #include <linux/elf-fdpic.h>
214 /* binfmt_elf handles non-fdpic elf except on nommu */
486 * If the arch defines ELF_BASE_PLATFORM (in asm/elf.h), the value
1252 static inline void fill_elf_fdpic_header(struct elfhdr *elf, int segs)
1254 memcpy(elf->e_ident, ELFMAG, SELFMAG);
1255 elf->e_ident[EI_CLASS] = ELF_CLASS;
1256 elf->e_ident[EI_DATA] = ELF_DATA;
1257 elf->e_ident[EI_VERSION] = EV_CURRENT;
1258 elf->e_ident[EI_OSABI] = ELF_OSABI;
1259 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD);
1261 elf->e_type = ET_CORE;
1262 elf->e_machine = ELF_ARCH;
1263 elf->e_version = EV_CURRENT;
1264 elf->e_entry = 0;
1265 elf->e_phoff = sizeof(struct elfhdr);
1266 elf->e_shoff = 0;
1267 elf->e_flags = ELF_FDPIC_CORE_EFLAGS;
1268 elf->e_ehsize = sizeof(struct elfhdr);
1269 elf->e_phentsize = sizeof(struct elf_phdr);
1270 elf->e_phnum = segs;
1271 elf->e_shentsize = 0;
1272 elf->e_shnum = 0;
1273 elf->e_shstrndx = 0;
1394 * In order to add the specific thread information for the elf file format,
1438 static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum,
1441 elf->e_shoff = e_shoff;
1442 elf->e_shentsize = sizeof(*shdr4extnum);
1443 elf->e_shnum = 1;
1444 elf->e_shstrndx = SHN_UNDEF;
1449 shdr4extnum->sh_size = elf->e_shnum;
1450 shdr4extnum->sh_link = elf->e_shstrndx;
1484 struct elfhdr *elf = NULL;
1499 elf = kmalloc(sizeof(*elf), GFP_KERNEL);
1500 if (!elf)
1532 * include/linux/elf.h for further information. */
1536 fill_elf_fdpic_header(elf, e_phnum);
1556 offset = sizeof(*elf); /* Elf header */
1578 fill_extnum_info(elf, shdr4extnum, e_shoff, segs);
1583 if (!dump_emit(cprm, elf, sizeof(*elf)))
1666 kfree(elf);