diff options
author | Mark Salter <msalter@redhat.com> | 2012-04-23 10:02:08 -0400 |
---|---|---|
committer | Mark Salter <msalter@redhat.com> | 2012-05-15 09:17:34 -0400 |
commit | fce244762775f662f5a278a05a6e494b6e4f2774 (patch) | |
tree | 4cc7c031181760963f73570c12cec1449011dbb8 /arch/c6x/include/asm/elf.h | |
parent | 18d14704d66f651395a68c8a70c86f0a22bccb31 (diff) |
C6X: add support to build with BINFMT_ELF_FDPIC
C6x userspace supports a shared library mechanism called DSBT for systems with
no MMU. DSBT is similar to FDPIC in allowing shared text segments and private
copies of data segments without an MMU. Both methods access data using a base
register and offset. With FDPIC, the caller of an external function sets up the
base register for the callee. With DSBT, the called function sets up its own
base register. Other details differ but both userspaces need the same thing
from the kernel loader: a map of where each ELF segment was loaded. The FDPIC
loader already provides this, so DSBT just uses it.
This patch enables BINFMT_ELF_FDPIC by default for C6X and provides the
necessary architecture hooks for the generic loader.
Signed-off-by: Mark Salter <msalter@redhat.com>
Diffstat (limited to 'arch/c6x/include/asm/elf.h')
-rw-r--r-- | arch/c6x/include/asm/elf.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/c6x/include/asm/elf.h b/arch/c6x/include/asm/elf.h index d57865ba2c4..f4552db20b4 100644 --- a/arch/c6x/include/asm/elf.h +++ b/arch/c6x/include/asm/elf.h @@ -30,7 +30,19 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; */ #define elf_check_arch(x) ((x)->e_machine == EM_TI_C6000) -#define elf_check_const_displacement(x) (1) +#define elf_check_fdpic(x) (1) +#define elf_check_const_displacement(x) (0) + +#define ELF_FDPIC_PLAT_INIT(_regs, _exec_map, _interp_map, _dynamic_addr) \ +do { \ + _regs->b4 = (_exec_map); \ + _regs->a6 = (_interp_map); \ + _regs->b6 = (_dynamic_addr); \ +} while (0) + +#define ELF_FDPIC_CORE_EFLAGS 0 + +#define ELF_CORE_COPY_FPREGS(...) 0 /* No FPU regs to copy */ /* * These are used to set parameters in the core dumps. |