#ifndef _LINUX_ELF_H
#define _LINUX_ELF_H
#include <linux/types.h>
#include <asm/elf.h>
#include <uapi/linux/elf.h>
#ifndef elf_read_implies_exec
#define elf_read_implies_exec …
#endif
#ifndef SET_PERSONALITY
#define SET_PERSONALITY …
#endif
#ifndef SET_PERSONALITY2
#define SET_PERSONALITY2(ex, state) …
#endif
#ifndef START_THREAD
#define START_THREAD(elf_ex, regs, elf_entry, start_stack) …
#endif
#if defined(ARCH_HAS_SETUP_ADDITIONAL_PAGES) && !defined(ARCH_SETUP_ADDITIONAL_PAGES)
#define ARCH_SETUP_ADDITIONAL_PAGES(bprm, ex, interpreter) …
#endif
#define ELF32_GNU_PROPERTY_ALIGN …
#define ELF64_GNU_PROPERTY_ALIGN …
#if ELF_CLASS == ELFCLASS32
extern Elf32_Dyn _DYNAMIC [];
#define elfhdr …
#define elf_phdr …
#define elf_shdr …
#define elf_note …
#define elf_addr_t …
#define Elf_Half …
#define Elf_Word …
#define ELF_GNU_PROPERTY_ALIGN …
#else
extern Elf64_Dyn _DYNAMIC [];
#define elfhdr …
#define elf_phdr …
#define elf_shdr …
#define elf_note …
#define elf_addr_t …
#define Elf_Half …
#define Elf_Word …
#define ELF_GNU_PROPERTY_ALIGN …
#endif
struct file;
struct coredump_params;
#ifndef CONFIG_ARCH_HAVE_EXTRA_ELF_NOTES
static inline int elf_coredump_extra_notes_size(void) { … }
static inline int elf_coredump_extra_notes_write(struct coredump_params *cprm) { … }
#else
extern int elf_coredump_extra_notes_size(void);
extern int elf_coredump_extra_notes_write(struct coredump_params *cprm);
#endif
struct gnu_property { … };
struct arch_elf_state;
#ifndef CONFIG_ARCH_USE_GNU_PROPERTY
static inline int arch_parse_elf_property(u32 type, const void *data,
size_t datasz, bool compat,
struct arch_elf_state *arch)
{ … }
#else
extern int arch_parse_elf_property(u32 type, const void *data, size_t datasz,
bool compat, struct arch_elf_state *arch);
#endif
#ifdef CONFIG_ARCH_HAVE_ELF_PROT
int arch_elf_adjust_prot(int prot, const struct arch_elf_state *state,
bool has_interp, bool is_interp);
#else
static inline int arch_elf_adjust_prot(int prot,
const struct arch_elf_state *state,
bool has_interp, bool is_interp)
{ … }
#endif
#endif