diff options
author | Artyom Tarasenko <atar4qemu@gmail.com> | 2011-07-14 19:37:06 +0200 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-07-14 17:41:29 +0000 |
commit | cf973e469bd9d47c0460347764c1315a6180e13c (patch) | |
tree | 0cc4666f0baf4f23da21b382a0e92bdeca94a483 /linux-user/elfload.c | |
parent | f838e2c535e47dc8e99ae7ec711407b849700cc9 (diff) |
set ELF_HWCAP for SPARC and SPARC64
setting ELF_HWCAP fixes dynamic library loading for Linux/sparc64
This patch allows loading busybox from Debian 6 initrd
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r-- | linux-user/elfload.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index b2746f2558..443d246ada 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -417,7 +417,8 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUState *env) #ifdef TARGET_SPARC64 #define ELF_START_MMAP 0x80000000 - +#define ELF_HWCAP (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | HWCAP_SPARC_SWAP \ + | HWCAP_SPARC_MULDIV | HWCAP_SPARC_V9) #ifndef TARGET_ABI32 #define elf_check_arch(x) ( (x) == EM_SPARCV9 || (x) == EM_SPARC32PLUS ) #else @@ -450,7 +451,8 @@ static inline void init_thread(struct target_pt_regs *regs, #else #define ELF_START_MMAP 0x80000000 - +#define ELF_HWCAP (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | HWCAP_SPARC_SWAP \ + | HWCAP_SPARC_MULDIV) #define elf_check_arch(x) ( (x) == EM_SPARC ) #define ELF_CLASS ELFCLASS32 |