Skip to content

Commit

Permalink
set ELF_HWCAP for SPARC and SPARC64
Browse files Browse the repository at this point in the history
setting ELF_HWCAP fixes dynamic library loading for Linux/sparc64
This patch allows loading busybox from Debian 6 initrd

Signed-off-by: Artyom Tarasenko <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
  • Loading branch information
artyom-tarasenko authored and blueswirl committed Jul 14, 2011
1 parent f838e2c commit cf973e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions linux-user/elfload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cf973e4

Please sign in to comment.