~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/asm-parisc/elf.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __ASMPARISC_ELF_H
  2 #define __ASMPARISC_ELF_H
  3 
  4 /*
  5  * ELF register definitions..
  6  */
  7 
  8 #include <asm/ptrace.h>
  9 
 10 #define EM_PARISC 15
 11 
 12 #define ELF_NGREG 32
 13 #define ELF_NFPREG 32
 14 
 15 typedef unsigned long elf_greg_t;
 16 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
 17 
 18 typedef double elf_fpreg_t;
 19 typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
 20 
 21 #define ELF_CORE_COPY_REGS(gregs, regs) \
 22         memcpy(gregs, regs, \
 23                sizeof(struct pt_regs) < sizeof(elf_gregset_t)? \
 24                sizeof(struct pt_regs): sizeof(elf_gregset_t));
 25 
 26 /*
 27  * This is used to ensure we don't load something for the wrong architecture.
 28  *
 29  * Note that this header file is used by default in fs/binfmt_elf.c. So
 30  * the following macros are for the default case. However, for the 64
 31  * bit kernel we also support 32 bit parisc binaries. To do that
 32  * arch/parisc64/kernel/binfmt_elf32.c defines its own set of these
 33  * macros, and then if includes fs/binfmt_elf.c to provide an alternate
 34  * elf binary handler for 32 bit binaries (on the 64 bit kernel).
 35  */
 36 
 37 #ifdef __LP64__
 38 #define ELF_CLASS       ELFCLASS64
 39 #else
 40 #define ELF_CLASS       ELFCLASS32
 41 #endif
 42 
 43 #define elf_check_arch(x) ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELF_CLASS)
 44 
 45 /*
 46  * These are used to set parameters in the core dumps.
 47  */
 48 #define ELF_DATA        ELFDATA2MSB
 49 #define ELF_ARCH        EM_PARISC
 50 
 51 /* %r23 is set by ld.so to a pointer to a function which might be 
 52    registered using atexit.  This provides a mean for the dynamic
 53    linker to call DT_FINI functions for shared libraries that have
 54    been loaded before the code runs.
 55 
 56    So that we can use the same startup file with static executables,
 57    we start programs with a value of 0 to indicate that there is no
 58    such function.  */
 59 #define ELF_PLAT_INIT(_r)       _r->gr[23] = 0
 60 
 61 #define USE_ELF_CORE_DUMP
 62 #define ELF_EXEC_PAGESIZE       4096
 63 
 64 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
 65    use of this is to invoke "./ld.so someprog" to test out a new version of
 66    the loader.  We need to make sure that it is out of the way of the program
 67    that it will "exec", and that there is sufficient room for the brk.
 68 
 69    (2 * TASK_SIZE / 3) turns into something undefined when run through a
 70    32 bit preprocessor and in some cases results in the kernel trying to map
 71    ld.so to the kernel virtual base. Use a sane value instead. /Jes 
 72   */
 73 
 74 #define ELF_ET_DYN_BASE         (TASK_UNMAPPED_BASE + 0x01000000)
 75 
 76 /* This yields a mask that user programs can use to figure out what
 77    instruction set this CPU supports.  This could be done in user space,
 78    but it's not easy, and we've already done it here.  */
 79 
 80 #define ELF_HWCAP       0
 81 /* (boot_cpu_data.x86_capability) */
 82 
 83 /* This yields a string that ld.so will use to load implementation
 84    specific libraries for optimization.  This is more specific in
 85    intent than poking at uname or /proc/cpuinfo.
 86 
 87    For the moment, we have only optimizations for the Intel generations,
 88    but that could change... */
 89 
 90 #define ELF_PLATFORM  ("PARISC\0" /*+((boot_cpu_data.x86-3)*5) */)
 91 
 92 #ifdef __KERNEL__
 93 #define SET_PERSONALITY(ex, ibcs2) \
 94         current->personality = PER_LINUX
 95 #endif
 96 
 97 #endif
 98 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.