Skip to content

Commit 67b660b

Browse files
author
Greg Ungerer
committed
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>
1 parent bd53e44 commit 67b660b

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

arch/m68k/include/asm/elf.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
6060
is actually used on ASV. */
6161
#define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0
6262

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+
6370
#if defined(CONFIG_SUN3) || defined(CONFIG_COLDFIRE)
6471
#define ELF_EXEC_PAGESIZE 8192
6572
#else
@@ -114,4 +121,6 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
114121

115122
#define ELF_PLATFORM (NULL)
116123

124+
#define ELF_FDPIC_CORE_EFLAGS 0
125+
117126
#endif

arch/m68k/include/uapi/asm/ptrace.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ struct switch_stack {
7474

7575
#define PTRACE_GET_THREAD_AREA 25
7676

77+
#define PTRACE_GETFDPIC 31
78+
7779
#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */
7880

81+
#define PTRACE_GETFDPIC_EXEC 0
82+
#define PTRACE_GETFDPIC_INTERP 1
83+
7984
#endif /* __ASSEMBLY__ */
8085
#endif /* _UAPI_M68K_PTRACE_H */

0 commit comments

Comments
 (0)