~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to linux-user/elfload32.c

  • Committer: pbrook
  • Date: 2006-10-22 00:18:54 UTC
  • Revision ID: git-v1:e6e5906b6e0a81718066ca43aef57515026c6624
ColdFire target.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2196 c046a42c-6fe2-441c-8c8c-71466251a162

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#define TARGET_ABI32
2
 
#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
 
 
10
 
int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs,
11
 
                    struct image_info *info);
12
 
 
13
 
int 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
 
}