Commit b0e026f4 authored by Jonas Bonn's avatar Jonas Bonn

openrisc: header file cleanups

elf.h: We can export some of these symbols to userspace.  libc needs them
and we just as well provide them as asm/elf.h as copying them into separate
libc headers.

ptrace.h: Having padding in the user_regs_struct isn't of any particular
value and just confuses GDB.  spr_defs isn't needed in userspace; libc
has its own copy anyway.
Signed-off-by: default avatarJonas Bonn <jonas@southpole.se>
parent 4971f2bd
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
header-y += spr_defs.h header-y += elf.h
header-y += ucontext.h
generic-y += atomic.h generic-y += atomic.h
generic-y += auxvec.h generic-y += auxvec.h
......
...@@ -19,12 +19,18 @@ ...@@ -19,12 +19,18 @@
#ifndef __ASM_OPENRISC_ELF_H #ifndef __ASM_OPENRISC_ELF_H
#define __ASM_OPENRISC_ELF_H #define __ASM_OPENRISC_ELF_H
/*
* This files is partially exported to userspace. This allows us to keep
* the ELF bits in one place which should assist in keeping the kernel and
* userspace in sync.
*/
/* /*
* ELF register definitions.. * ELF register definitions..
*/ */
#include <linux/types.h>
#include <linux/ptrace.h>
/* for struct user_regs_struct definition */
#include <asm/ptrace.h>
/* The OR1K relocation types... not all relevant for module loader */ /* The OR1K relocation types... not all relevant for module loader */
#define R_OR32_NONE 0 #define R_OR32_NONE 0
...@@ -62,6 +68,8 @@ typedef unsigned long elf_fpregset_t; ...@@ -62,6 +68,8 @@ typedef unsigned long elf_fpregset_t;
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/types.h>
/* /*
* This is used to ensure we don't load something for the wrong architecture. * This is used to ensure we don't load something for the wrong architecture.
*/ */
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
#ifndef __ASM_OPENRISC_PTRACE_H #ifndef __ASM_OPENRISC_PTRACE_H
#define __ASM_OPENRISC_PTRACE_H #define __ASM_OPENRISC_PTRACE_H
#include <asm/spr_defs.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/* /*
* This is the layout of the regset returned by the GETREGSET ptrace call * This is the layout of the regset returned by the GETREGSET ptrace call
...@@ -30,13 +28,13 @@ struct user_regs_struct { ...@@ -30,13 +28,13 @@ struct user_regs_struct {
unsigned long gpr[32]; unsigned long gpr[32];
unsigned long pc; unsigned long pc;
unsigned long sr; unsigned long sr;
unsigned long pad1;
unsigned long pad2;
}; };
#endif #endif
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <asm/spr_defs.h>
/* /*
* Make kernel PTrace/register structures opaque to userspace... userspace can * Make kernel PTrace/register structures opaque to userspace... userspace can
* access thread state via the regset mechanism. This allows us a bit of * access thread state via the regset mechanism. This allows us a bit of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment