Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

m68knommu: add definitions to support elf_fdpic program loader

Add a few required defines to support using the binfmt_elf_fdpic
loader on the m68k architecture. The values are defined to be consistent
with those used on arm and sh which support this too.

The most important m68k specific change is the register initialization.
The pt_reg structure only contains a subset of the architecture general
registers, so we are more limited than to be expected on what can be used.

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>

+14
+9
arch/m68k/include/asm/elf.h
··· 60 60 is actually used on ASV. */ 61 61 #define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0 62 62 63 + #define ELF_FDPIC_PLAT_INIT(_r, _exec_map_addr, _interp_map_addr, dynamic_addr) \ 64 + do { \ 65 + (_r)->d3 = _exec_map_addr; \ 66 + (_r)->d4 = _interp_map_addr; \ 67 + (_r)->d5 = dynamic_addr; \ 68 + } while(0) 69 + 63 70 #if defined(CONFIG_SUN3) || defined(CONFIG_COLDFIRE) 64 71 #define ELF_EXEC_PAGESIZE 8192 65 72 #else ··· 120 113 intent than poking at uname or /proc/cpuinfo. */ 121 114 122 115 #define ELF_PLATFORM (NULL) 116 + 117 + #define ELF_FDPIC_CORE_EFLAGS 0 123 118 124 119 #endif
+5
arch/m68k/include/uapi/asm/ptrace.h
··· 74 74 75 75 #define PTRACE_GET_THREAD_AREA 25 76 76 77 + #define PTRACE_GETFDPIC 31 78 + 77 79 #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ 80 + 81 + #define PTRACE_GETFDPIC_EXEC 0 82 + #define PTRACE_GETFDPIC_INTERP 1 78 83 79 84 #endif /* __ASSEMBLY__ */ 80 85 #endif /* _UAPI_M68K_PTRACE_H */