diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 11:41:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 11:41:13 -0400 |
commit | b10a8b7238d7b034f28d32a85bb05c48475f132a (patch) | |
tree | 8e70e816757c2a517de6fb721dd9ac2276619c26 /include/asm-sh/elf.h | |
parent | 37eaf8c7463e53cf1acf025fb566fb6c4573297f (diff) | |
parent | 8b2224dc6a5b46cfa1d54ab1fe82107351c66443 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (72 commits)
sh: SuperH Mobile CEU and camera platform data for AP325RXA
sh: Update smc911x platform data for AP325RXA
sh: SuperH Mobile LCDC platform data for AP325RXA
sh: Add SuperH Mobile CEU platform data for Migo-R
sh: Add SuperH Mobile LCDC platform data for Migo-R
sh: Move asid_cache() out of ifdef to fix SH-3/4 nommu build.
sh: Workaround for __put_user_asm() bug with gcc 4.x on big-endian.
sh: Wire up new syscalls.
sh: fix uImage Entry Point
sh_keysc: remove request_mem_region() and release_mem_region()
sh: Don't miss pending signals returning to user mode after signal processing
sh: Use clk_always_enable() on sh7366
sh: Use clk_always_enable() on sh7343 / SE77343
sh: Use clk_always_enable() on sh7722 / Migo-R / SE7722
sh: Use clk_always_enable() on sh7723 / ap325rxa
sh: Introduce clk_always_enable() function
sh: Show all clocks and their state in /proc/clocks
sh: Merge sh7343 and sh7722 clock code
sh: Add SuperH Mobile MSTPCR bits to clock framework
sh: Use arch_flags to simplify sh7722 siu clock code
...
Diffstat (limited to 'include/asm-sh/elf.h')
-rw-r--r-- | include/asm-sh/elf.h | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/include/asm-sh/elf.h b/include/asm-sh/elf.h index 05092da1aa59..f01449a8d378 100644 --- a/include/asm-sh/elf.h +++ b/include/asm-sh/elf.h | |||
@@ -1,10 +1,15 @@ | |||
1 | #ifndef __ASM_SH_ELF_H | 1 | #ifndef __ASM_SH_ELF_H |
2 | #define __ASM_SH_ELF_H | 2 | #define __ASM_SH_ELF_H |
3 | 3 | ||
4 | #include <linux/utsname.h> | ||
4 | #include <asm/auxvec.h> | 5 | #include <asm/auxvec.h> |
5 | #include <asm/ptrace.h> | 6 | #include <asm/ptrace.h> |
6 | #include <asm/user.h> | 7 | #include <asm/user.h> |
7 | 8 | ||
9 | /* ELF header e_flags defines */ | ||
10 | #define EF_SH_PIC 0x100 /* -fpic */ | ||
11 | #define EF_SH_FDPIC 0x8000 /* -mfdpic */ | ||
12 | |||
8 | /* SH (particularly SHcompact) relocation types */ | 13 | /* SH (particularly SHcompact) relocation types */ |
9 | #define R_SH_NONE 0 | 14 | #define R_SH_NONE 0 |
10 | #define R_SH_DIR32 1 | 15 | #define R_SH_DIR32 1 |
@@ -43,6 +48,28 @@ | |||
43 | #define R_SH_RELATIVE 165 | 48 | #define R_SH_RELATIVE 165 |
44 | #define R_SH_GOTOFF 166 | 49 | #define R_SH_GOTOFF 166 |
45 | #define R_SH_GOTPC 167 | 50 | #define R_SH_GOTPC 167 |
51 | |||
52 | /* FDPIC relocs */ | ||
53 | #define R_SH_GOT20 70 | ||
54 | #define R_SH_GOTOFF20 71 | ||
55 | #define R_SH_GOTFUNCDESC 72 | ||
56 | #define R_SH_GOTFUNCDESC20 73 | ||
57 | #define R_SH_GOTOFFFUNCDESC 74 | ||
58 | #define R_SH_GOTOFFFUNCDESC20 75 | ||
59 | #define R_SH_FUNCDESC 76 | ||
60 | #define R_SH_FUNCDESC_VALUE 77 | ||
61 | |||
62 | #if 0 /* XXX - later .. */ | ||
63 | #define R_SH_GOT20 198 | ||
64 | #define R_SH_GOTOFF20 199 | ||
65 | #define R_SH_GOTFUNCDESC 200 | ||
66 | #define R_SH_GOTFUNCDESC20 201 | ||
67 | #define R_SH_GOTOFFFUNCDESC 202 | ||
68 | #define R_SH_GOTOFFFUNCDESC20 203 | ||
69 | #define R_SH_FUNCDESC 204 | ||
70 | #define R_SH_FUNCDESC_VALUE 205 | ||
71 | #endif | ||
72 | |||
46 | /* SHmedia relocs */ | 73 | /* SHmedia relocs */ |
47 | #define R_SH_IMM_LOW16 246 | 74 | #define R_SH_IMM_LOW16 246 |
48 | #define R_SH_IMM_LOW16_PCREL 247 | 75 | #define R_SH_IMM_LOW16_PCREL 247 |
@@ -77,9 +104,12 @@ typedef struct user_fpu_struct elf_fpregset_t; | |||
77 | /* | 104 | /* |
78 | * This is used to ensure we don't load something for the wrong architecture. | 105 | * This is used to ensure we don't load something for the wrong architecture. |
79 | */ | 106 | */ |
80 | #define elf_check_arch(x) ( (x)->e_machine == EM_SH ) | 107 | #define elf_check_arch(x) ((x)->e_machine == EM_SH) |
108 | #define elf_check_fdpic(x) ((x)->e_flags & EF_SH_FDPIC) | ||
109 | #define elf_check_const_displacement(x) ((x)->e_flags & EF_SH_PIC) | ||
81 | 110 | ||
82 | #define USE_ELF_CORE_DUMP | 111 | #define USE_ELF_CORE_DUMP |
112 | #define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC | ||
83 | #define ELF_EXEC_PAGESIZE PAGE_SIZE | 113 | #define ELF_EXEC_PAGESIZE PAGE_SIZE |
84 | 114 | ||
85 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | 115 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical |
@@ -136,6 +166,27 @@ typedef struct user_fpu_struct elf_fpregset_t; | |||
136 | _r->regs[8]=0; _r->regs[9]=0; _r->regs[10]=0; _r->regs[11]=0; \ | 166 | _r->regs[8]=0; _r->regs[9]=0; _r->regs[10]=0; _r->regs[11]=0; \ |
137 | _r->regs[12]=0; _r->regs[13]=0; _r->regs[14]=0; \ | 167 | _r->regs[12]=0; _r->regs[13]=0; _r->regs[14]=0; \ |
138 | _r->sr = SR_FD; } while (0) | 168 | _r->sr = SR_FD; } while (0) |
169 | |||
170 | #define ELF_FDPIC_PLAT_INIT(_r, _exec_map_addr, _interp_map_addr, \ | ||
171 | _dynamic_addr) \ | ||
172 | do { \ | ||
173 | _r->regs[0] = 0; \ | ||
174 | _r->regs[1] = 0; \ | ||
175 | _r->regs[2] = 0; \ | ||
176 | _r->regs[3] = 0; \ | ||
177 | _r->regs[4] = 0; \ | ||
178 | _r->regs[5] = 0; \ | ||
179 | _r->regs[6] = 0; \ | ||
180 | _r->regs[7] = 0; \ | ||
181 | _r->regs[8] = _exec_map_addr; \ | ||
182 | _r->regs[9] = _interp_map_addr; \ | ||
183 | _r->regs[10] = _dynamic_addr; \ | ||
184 | _r->regs[11] = 0; \ | ||
185 | _r->regs[12] = 0; \ | ||
186 | _r->regs[13] = 0; \ | ||
187 | _r->regs[14] = 0; \ | ||
188 | _r->sr = SR_FD; \ | ||
189 | } while (0) | ||
139 | #endif | 190 | #endif |
140 | 191 | ||
141 | #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) | 192 | #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) |