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

TOMOYO Linux Cross Reference
Linux/arch/metag/include/asm/elf.h

Version: ~ [ linux-5.3 ] ~ [ linux-5.2.15 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.73 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.144 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.193 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.193 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.73 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __ASM_METAG_ELF_H
  2 #define __ASM_METAG_ELF_H
  3 
  4 #define EM_METAG      174
  5 
  6 /* Meta relocations */
  7 #define R_METAG_HIADDR16                 0
  8 #define R_METAG_LOADDR16                 1
  9 #define R_METAG_ADDR32                   2
 10 #define R_METAG_NONE                     3
 11 #define R_METAG_RELBRANCH                4
 12 #define R_METAG_GETSETOFF                5
 13 
 14 /* Backward compatibility */
 15 #define R_METAG_REG32OP1                 6
 16 #define R_METAG_REG32OP2                 7
 17 #define R_METAG_REG32OP3                 8
 18 #define R_METAG_REG16OP1                 9
 19 #define R_METAG_REG16OP2                10
 20 #define R_METAG_REG16OP3                11
 21 #define R_METAG_REG32OP4                12
 22 
 23 #define R_METAG_HIOG                    13
 24 #define R_METAG_LOOG                    14
 25 
 26 /* GNU */
 27 #define R_METAG_GNU_VTINHERIT           30
 28 #define R_METAG_GNU_VTENTRY             31
 29 
 30 /* PIC relocations */
 31 #define R_METAG_HI16_GOTOFF             32
 32 #define R_METAG_LO16_GOTOFF             33
 33 #define R_METAG_GETSET_GOTOFF           34
 34 #define R_METAG_GETSET_GOT              35
 35 #define R_METAG_HI16_GOTPC              36
 36 #define R_METAG_LO16_GOTPC              37
 37 #define R_METAG_HI16_PLT                38
 38 #define R_METAG_LO16_PLT                39
 39 #define R_METAG_RELBRANCH_PLT           40
 40 #define R_METAG_GOTOFF                  41
 41 #define R_METAG_PLT                     42
 42 #define R_METAG_COPY                    43
 43 #define R_METAG_JMP_SLOT                44
 44 #define R_METAG_RELATIVE                45
 45 #define R_METAG_GLOB_DAT                46
 46 
 47 /*
 48  * ELF register definitions.
 49  */
 50 
 51 #include <asm/page.h>
 52 #include <asm/processor.h>
 53 #include <asm/ptrace.h>
 54 #include <asm/user.h>
 55 
 56 typedef unsigned long elf_greg_t;
 57 
 58 #define ELF_NGREG (sizeof(struct user_gp_regs) / sizeof(elf_greg_t))
 59 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
 60 
 61 typedef unsigned long elf_fpregset_t;
 62 
 63 /*
 64  * This is used to ensure we don't load something for the wrong architecture.
 65  */
 66 #define elf_check_arch(x) ((x)->e_machine == EM_METAG)
 67 
 68 /*
 69  * These are used to set parameters in the core dumps.
 70  */
 71 #define ELF_CLASS       ELFCLASS32
 72 #define ELF_DATA        ELFDATA2LSB
 73 #define ELF_ARCH        EM_METAG
 74 
 75 #define ELF_PLAT_INIT(_r, load_addr)    \
 76         do { _r->ctx.AX[0].U0 = 0; } while (0)
 77 
 78 #define USE_ELF_CORE_DUMP
 79 #define CORE_DUMP_USE_REGSET
 80 #define ELF_EXEC_PAGESIZE       PAGE_SIZE
 81 
 82 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
 83    use of this is to invoke "./ld.so someprog" to test out a new version of
 84    the loader.  We need to make sure that it is out of the way of the program
 85    that it will "exec", and that there is sufficient room for the brk.  */
 86 
 87 #define ELF_ET_DYN_BASE         0x08000000UL
 88 
 89 #define ELF_CORE_COPY_REGS(_dest, _regs)                        \
 90         memcpy((char *)&_dest, (char *)_regs, sizeof(struct pt_regs));
 91 
 92 /* This yields a mask that user programs can use to figure out what
 93    instruction set this cpu supports.  */
 94 
 95 #define ELF_HWCAP       (0)
 96 
 97 /* This yields a string that ld.so will use to load implementation
 98    specific libraries for optimization.  This is more specific in
 99    intent than poking at uname or /proc/cpuinfo.  */
100 
101 #define ELF_PLATFORM  (NULL)
102 
103 #define STACK_RND_MASK (0)
104 
105 #ifdef CONFIG_METAG_USER_TCM
106 
107 struct elf32_phdr;
108 struct file;
109 
110 unsigned long __metag_elf_map(struct file *filep, unsigned long addr,
111                               struct elf32_phdr *eppnt, int prot, int type,
112                               unsigned long total_size);
113 
114 static inline unsigned long metag_elf_map(struct file *filep,
115                                           unsigned long addr,
116                                           struct elf32_phdr *eppnt, int prot,
117                                           int type, unsigned long total_size)
118 {
119         return __metag_elf_map(filep, addr, eppnt, prot, type, total_size);
120 }
121 #define elf_map metag_elf_map
122 
123 #endif
124 
125 #endif
126 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp