Skip to content

Commit

Permalink
[POWERPC] Switch to generic compat_binfmt_elf code
Browse files Browse the repository at this point in the history
This switches the CONFIG_PPC64 support for 32-bit ELF to use the
generic fs/compat_binfmt_elf.c implementation instead of our own
binfmt_elf32.c.  Since so much is the same between 32/64, there is
only one macro we have to define to make the generic support work out
of the box.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Roland McGrath authored and Paul Mackerras committed Feb 7, 2008
1 parent 8197038 commit 01e31db
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 70 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ config EARLY_PRINTK
config COMPAT
bool
default y if PPC64
select COMPAT_BINFMT_ELF

config SYSVIPC_COMPAT
bool
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ obj-y := semaphore.o cputable.o ptrace.o syscalls.o \
init_task.o process.o systbl.o idle.o \
signal.o
obj-y += vdso32/
obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \
signal_64.o ptrace32.o \
paca.o cpu_setup_ppc970.o \
cpu_setup_pa6t.o \
Expand Down
69 changes: 0 additions & 69 deletions arch/powerpc/kernel/binfmt_elf32.c

This file was deleted.

1 change: 1 addition & 0 deletions include/asm-powerpc/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32];
* This is used to ensure we don't load something for the wrong architecture.
*/
#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
#define compat_elf_check_arch(x) ((x)->e_machine == EM_PPC)

#define USE_ELF_CORE_DUMP
#define CORE_DUMP_USE_REGSET
Expand Down

0 comments on commit 01e31db

Please sign in to comment.