blob: 4b4648c759e82f8af7e341b20dab98fe9b4a9abb [file] [log] [blame]
blueswir1992f48a2007-10-14 16:27:31 +00001#define TARGET_ABI32
blueswir1cb33da52007-10-09 16:34:29 +00002#define load_elf_binary load_elf_binary32
3#define do_init_thread do_init_thread32
4
5#include "elfload.c"
6
7#undef load_elf_binary
8#undef do_init_thread
9
10int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs,
11 struct image_info *info);
12
13int load_elf_binary_multi(struct linux_binprm *bprm,
14 struct target_pt_regs *regs,
15 struct image_info *info)
16{
17 struct elfhdr *elf_ex;
18 int retval;
19
20 elf_ex = (struct elfhdr *) bprm->buf; /* exec-header */
21 if (elf_ex->e_ident[EI_CLASS] == ELFCLASS64) {
22 retval = load_elf_binary(bprm, regs, info);
23 } else {
24 retval = load_elf_binary32(bprm, regs, info);
25 if (personality(info->personality) == PER_LINUX)
26 info->personality = PER_LINUX32;
27 }
28
29 return retval;
30}