mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 03:20:53 +07:00
binfmt_elf: cleanups
This cleans up a few bits in binfmt_elf.c and binfmts.h: - the hasvdso field in struct linux_binfmt is unused, so remove it and the only initialization of it - the elf_map CPP symbol is not defined anywhere in the kernel, so remove an unnecessary #ifndef elf_map - reduce excessive indentation in elf_format's initializer - add missing spaces, remove extraneous spaces No functional changes, but tested on x86 (32 and 64 bit), powerpc (32 and 64 bit), sparc64, arm, and alpha. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
52bd19f769
commit
f670d0ecda
@ -71,7 +71,6 @@ static struct linux_binfmt elf_format = {
|
||||
.load_shlib = load_elf_library,
|
||||
.core_dump = elf_core_dump,
|
||||
.min_coredump = ELF_EXEC_PAGESIZE,
|
||||
.hasvdso = 1
|
||||
};
|
||||
|
||||
#define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
|
||||
@ -316,8 +315,6 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef elf_map
|
||||
|
||||
static unsigned long elf_map(struct file *filep, unsigned long addr,
|
||||
struct elf_phdr *eppnt, int prot, int type,
|
||||
unsigned long total_size)
|
||||
@ -354,8 +351,6 @@ static unsigned long elf_map(struct file *filep, unsigned long addr,
|
||||
return(map_addr);
|
||||
}
|
||||
|
||||
#endif /* !elf_map */
|
||||
|
||||
static unsigned long total_mapping_size(struct elf_phdr *cmds, int nr)
|
||||
{
|
||||
int i, first_idx = -1, last_idx = -1;
|
||||
|
@ -93,7 +93,6 @@ struct linux_binfmt {
|
||||
int (*load_shlib)(struct file *);
|
||||
int (*core_dump)(struct coredump_params *cprm);
|
||||
unsigned long min_coredump; /* minimal dump size */
|
||||
int hasvdso;
|
||||
};
|
||||
|
||||
extern int __register_binfmt(struct linux_binfmt *fmt, int insert);
|
||||
|
Loading…
Reference in New Issue
Block a user