Path: blob/master/arch/microblaze/include/asm/elf.h
15126 views
/*1* Copyright (C) 2008-2009 Michal Simek <[email protected]>2* Copyright (C) 2008-2009 PetaLogix3* Copyright (C) 2006 Atmark Techno, Inc.4*5* This file is subject to the terms and conditions of the GNU General Public6* License. See the file "COPYING" in the main directory of this archive7* for more details.8*/910#ifndef _ASM_MICROBLAZE_ELF_H11#define _ASM_MICROBLAZE_ELF_H1213/*14* Note there is no "official" ELF designation for Microblaze.15* I've snaffled the value from the microblaze binutils source code16* /binutils/microblaze/include/elf/microblaze.h17*/18#define EM_XILINX_MICROBLAZE 0xbaab19#define ELF_ARCH EM_XILINX_MICROBLAZE2021/*22* This is used to ensure we don't load something for the wrong architecture.23*/24#define elf_check_arch(x) ((x)->e_machine == EM_XILINX_MICROBLAZE)2526/*27* These are used to set parameters in the core dumps.28*/29#define ELF_CLASS ELFCLASS323031#ifndef __uClinux__3233/*34* ELF register definitions..35*/3637#include <asm/ptrace.h>38#include <asm/byteorder.h>3940#ifndef ELF_GREG_T41#define ELF_GREG_T42typedef unsigned long elf_greg_t;43#endif4445#ifndef ELF_NGREG46#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))47#endif4849#ifndef ELF_GREGSET_T50#define ELF_GREGSET_T51typedef elf_greg_t elf_gregset_t[ELF_NGREG];52#endif5354#ifndef ELF_FPREGSET_T55#define ELF_FPREGSET_T5657/* TBD */58#define ELF_NFPREG 33 /* includes fsr */59typedef unsigned long elf_fpreg_t;60typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];6162/* typedef struct user_fpu_struct elf_fpregset_t; */63#endif6465/* This is the location that an ET_DYN program is loaded if exec'ed. Typical66* use of this is to invoke "./ld.so someprog" to test out a new version of67* the loader. We need to make sure that it is out of the way of the program68* that it will "exec", and that there is sufficient room for the brk.69*/7071#define ELF_ET_DYN_BASE (0x08000000)7273#ifdef __MICROBLAZEEL__74#define ELF_DATA ELFDATA2LSB75#else76#define ELF_DATA ELFDATA2MSB77#endif7879#define ELF_EXEC_PAGESIZE PAGE_SIZE808182#define ELF_CORE_COPY_REGS(_dest, _regs) \83memcpy((char *) &_dest, (char *) _regs, \84sizeof(struct pt_regs));8586/* This yields a mask that user programs can use to figure out what87* instruction set this CPU supports. This could be done in user space,88* but it's not easy, and we've already done it here.89*/90#define ELF_HWCAP (0)9192/* This yields a string that ld.so will use to load implementation93* specific libraries for optimization. This is more specific in94* intent than poking at uname or /proc/cpuinfo.9596* For the moment, we have only optimizations for the Intel generations,97* but that could change...98*/99#define ELF_PLATFORM (NULL)100101/* Added _f parameter. Is this definition correct: TBD */102#define ELF_PLAT_INIT(_r, _f) \103do { \104_r->r1 = _r->r1 = _r->r2 = _r->r3 = \105_r->r4 = _r->r5 = _r->r6 = _r->r7 = \106_r->r8 = _r->r9 = _r->r10 = _r->r11 = \107_r->r12 = _r->r13 = _r->r14 = _r->r15 = \108_r->r16 = _r->r17 = _r->r18 = _r->r19 = \109_r->r20 = _r->r21 = _r->r22 = _r->r23 = \110_r->r24 = _r->r25 = _r->r26 = _r->r27 = \111_r->r28 = _r->r29 = _r->r30 = _r->r31 = \1120; \113} while (0)114115#ifdef __KERNEL__116#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT)117#endif118119#endif /* __uClinux__ */120121#endif /* _ASM_MICROBLAZE_ELF_H */122123124