*/
 #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.
 
 
 typedef struct {
        unsigned long           end_brk;
+#ifdef CONFIG_BINFMT_ELF_FDPIC
+       unsigned long   exec_fdpic_loadmap;
+       unsigned long   interp_fdpic_loadmap;
+#endif
 } mm_context_t;
 
 #endif /* _ASM_C6X_MMU_H */
 
 #define PT_DP     PT_B14  /* Data Segment Pointer (B14) */
 #define PT_SP     PT_B15  /* Stack Pointer (B15)  */
 
+#define PTRACE_GETFDPIC                31      /* get the ELF fdpic loadmap address */
+
+#define PTRACE_GETFDPIC_EXEC   0       /* [addr] request the executable loadmap */
+#define PTRACE_GETFDPIC_INTERP 1       /* [addr] request the interpreter loadmap */
+
 #ifndef __ASSEMBLY__
 
 #ifdef _BIG_ENDIAN
 
 config BINFMT_ELF_FDPIC
        bool "Kernel support for FDPIC ELF binaries"
        default y
-       depends on (FRV || BLACKFIN || (SUPERH32 && !MMU))
+       depends on (FRV || BLACKFIN || (SUPERH32 && !MMU) || C6X)
        help
          ELF FDPIC binaries are based on ELF, but allow the individual load
          segments of a binary to be located in memory independently of each