Path: blob/master/arch/unicore32/include/asm/elf.h
10818 views
/*1* linux/arch/unicore32/include/asm/elf.h2*3* Code specific to PKUnity SoC and UniCore ISA4*5* Copyright (C) 2001-2010 GUAN Xue-tao6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License version 2 as9* published by the Free Software Foundation.10*/1112#ifndef __UNICORE_ELF_H__13#define __UNICORE_ELF_H__1415#include <asm/hwcap.h>1617/*18* ELF register definitions..19*/20#include <asm/ptrace.h>2122typedef unsigned long elf_greg_t;23typedef unsigned long elf_freg_t[3];2425#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))26typedef elf_greg_t elf_gregset_t[ELF_NGREG];2728typedef struct fp_state elf_fpregset_t;2930#define EM_UNICORE 1103132#define R_UNICORE_NONE 033#define R_UNICORE_PC24 134#define R_UNICORE_ABS32 235#define R_UNICORE_CALL 2836#define R_UNICORE_JUMP24 293738/*39* These are used to set parameters in the core dumps.40*/41#define ELF_CLASS ELFCLASS3242#define ELF_DATA ELFDATA2LSB43#define ELF_ARCH EM_UNICORE4445/*46* This yields a string that ld.so will use to load implementation47* specific libraries for optimization. This is more specific in48* intent than poking at uname or /proc/cpuinfo.49*50*/51#define ELF_PLATFORM_SIZE 852#define ELF_PLATFORM (elf_platform)5354extern char elf_platform[];5556struct elf32_hdr;5758/*59* This is used to ensure we don't load something for the wrong architecture.60*/61extern int elf_check_arch(const struct elf32_hdr *);62#define elf_check_arch elf_check_arch6364struct task_struct;65int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);66#define ELF_CORE_COPY_TASK_REGS dump_task_regs6768#define ELF_EXEC_PAGESIZE 40966970/* This is the location that an ET_DYN program is loaded if exec'ed. Typical71use of this is to invoke "./ld.so someprog" to test out a new version of72the loader. We need to make sure that it is out of the way of the program73that it will "exec", and that there is sufficient room for the brk. */7475#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)7677/* When the program starts, a1 contains a pointer to a function to be78registered with atexit, as per the SVR4 ABI. A value of 0 means we79have no such handler. */80#define ELF_PLAT_INIT(_r, load_addr) {(_r)->UCreg_00 = 0; }8182extern void elf_set_personality(const struct elf32_hdr *);83#define SET_PERSONALITY(ex) elf_set_personality(&(ex))8485struct mm_struct;86extern unsigned long arch_randomize_brk(struct mm_struct *mm);87#define arch_randomize_brk arch_randomize_brk8889extern int vectors_user_mapping(void);90#define arch_setup_additional_pages(bprm, uses_interp) vectors_user_mapping()91#define ARCH_HAS_SETUP_ADDITIONAL_PAGES9293#endif949596