forked from luck/tmp_suning_uos_patched
Merge branch 'frv' (FRV patches from David Howells)
Merge emailed FRV fixes from David Howells. * frv: FRV: Fix linux/elf-fdpic.h FRV: Fix const sections change FRV: Fix incorrect symbol in copy_thread() FRV: Fix VLIW packing constraint violation in entry.S
This commit is contained in:
commit
90a24a4a7e
|
@ -867,8 +867,8 @@ ret_from_fork:
|
|||
ret_from_kernel_thread:
|
||||
lddi.p @(gr28,#REG_GR(8)),gr20
|
||||
call schedule_tail
|
||||
or.p gr20,gr20,gr8
|
||||
calll @(gr21,gr0)
|
||||
calll.p @(gr21,gr0)
|
||||
or gr20,gr20,gr8
|
||||
bra sys_exit
|
||||
|
||||
.globl ret_from_kernel_execve
|
||||
|
|
|
@ -194,7 +194,7 @@ int copy_thread(unsigned long clone_flags,
|
|||
memset(childregs, 0, sizeof(struct pt_regs));
|
||||
childregs->gr9 = usp; /* function */
|
||||
childregs->gr8 = arg;
|
||||
chilregs->psr = PSR_S;
|
||||
childregs->psr = PSR_S;
|
||||
p->thread.pc = (unsigned long) ret_from_kernel_thread;
|
||||
save_user_regs(p->thread.user);
|
||||
return 0;
|
||||
|
|
|
@ -112,9 +112,11 @@ char __initdata redboot_command_line[COMMAND_LINE_SIZE];
|
|||
#ifdef CONFIG_PM
|
||||
#define __pminit
|
||||
#define __pminitdata
|
||||
#define __pminitconst
|
||||
#else
|
||||
#define __pminit __init
|
||||
#define __pminitdata __initdata
|
||||
#define __pminitconst __initconst
|
||||
#endif
|
||||
|
||||
struct clock_cmode {
|
||||
|
|
51
include/linux/elf-fdpic.h
Normal file
51
include/linux/elf-fdpic.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
/* FDPIC ELF load map
|
||||
*
|
||||
* Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_ELF_FDPIC_H
|
||||
#define _LINUX_ELF_FDPIC_H
|
||||
|
||||
#include <uapi/linux/elf-fdpic.h>
|
||||
|
||||
/*
|
||||
* binfmt binary parameters structure
|
||||
*/
|
||||
struct elf_fdpic_params {
|
||||
struct elfhdr hdr; /* ref copy of ELF header */
|
||||
struct elf_phdr *phdrs; /* ref copy of PT_PHDR table */
|
||||
struct elf32_fdpic_loadmap *loadmap; /* loadmap to be passed to userspace */
|
||||
unsigned long elfhdr_addr; /* mapped ELF header user address */
|
||||
unsigned long ph_addr; /* mapped PT_PHDR user address */
|
||||
unsigned long map_addr; /* mapped loadmap user address */
|
||||
unsigned long entry_addr; /* mapped entry user address */
|
||||
unsigned long stack_size; /* stack size requested (PT_GNU_STACK) */
|
||||
unsigned long dynamic_addr; /* mapped PT_DYNAMIC user address */
|
||||
unsigned long load_addr; /* user address at which to map binary */
|
||||
unsigned long flags;
|
||||
#define ELF_FDPIC_FLAG_ARRANGEMENT 0x0000000f /* PT_LOAD arrangement flags */
|
||||
#define ELF_FDPIC_FLAG_INDEPENDENT 0x00000000 /* PT_LOADs can be put anywhere */
|
||||
#define ELF_FDPIC_FLAG_HONOURVADDR 0x00000001 /* PT_LOAD.vaddr must be honoured */
|
||||
#define ELF_FDPIC_FLAG_CONSTDISP 0x00000002 /* PT_LOADs require constant
|
||||
* displacement */
|
||||
#define ELF_FDPIC_FLAG_CONTIGUOUS 0x00000003 /* PT_LOADs should be contiguous */
|
||||
#define ELF_FDPIC_FLAG_EXEC_STACK 0x00000010 /* T if stack to be executable */
|
||||
#define ELF_FDPIC_FLAG_NOEXEC_STACK 0x00000020 /* T if stack not to be executable */
|
||||
#define ELF_FDPIC_FLAG_EXECUTABLE 0x00000040 /* T if this object is the executable */
|
||||
#define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params,
|
||||
struct elf_fdpic_params *interp_params,
|
||||
unsigned long *start_stack,
|
||||
unsigned long *start_brk);
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_ELF_FDPIC_H */
|
|
@ -9,8 +9,8 @@
|
|||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_ELF_FDPIC_H
|
||||
#define _LINUX_ELF_FDPIC_H
|
||||
#ifndef _UAPI_LINUX_ELF_FDPIC_H
|
||||
#define _UAPI_LINUX_ELF_FDPIC_H
|
||||
|
||||
#include <linux/elf.h>
|
||||
|
||||
|
@ -31,40 +31,4 @@ struct elf32_fdpic_loadmap {
|
|||
|
||||
#define ELF32_FDPIC_LOADMAP_VERSION 0x0000
|
||||
|
||||
#ifndef __KERNEL__
|
||||
/*
|
||||
* binfmt binary parameters structure
|
||||
*/
|
||||
struct elf_fdpic_params {
|
||||
struct elfhdr hdr; /* ref copy of ELF header */
|
||||
struct elf_phdr *phdrs; /* ref copy of PT_PHDR table */
|
||||
struct elf32_fdpic_loadmap *loadmap; /* loadmap to be passed to userspace */
|
||||
unsigned long elfhdr_addr; /* mapped ELF header user address */
|
||||
unsigned long ph_addr; /* mapped PT_PHDR user address */
|
||||
unsigned long map_addr; /* mapped loadmap user address */
|
||||
unsigned long entry_addr; /* mapped entry user address */
|
||||
unsigned long stack_size; /* stack size requested (PT_GNU_STACK) */
|
||||
unsigned long dynamic_addr; /* mapped PT_DYNAMIC user address */
|
||||
unsigned long load_addr; /* user address at which to map binary */
|
||||
unsigned long flags;
|
||||
#define ELF_FDPIC_FLAG_ARRANGEMENT 0x0000000f /* PT_LOAD arrangement flags */
|
||||
#define ELF_FDPIC_FLAG_INDEPENDENT 0x00000000 /* PT_LOADs can be put anywhere */
|
||||
#define ELF_FDPIC_FLAG_HONOURVADDR 0x00000001 /* PT_LOAD.vaddr must be honoured */
|
||||
#define ELF_FDPIC_FLAG_CONSTDISP 0x00000002 /* PT_LOADs require constant
|
||||
* displacement */
|
||||
#define ELF_FDPIC_FLAG_CONTIGUOUS 0x00000003 /* PT_LOADs should be contiguous */
|
||||
#define ELF_FDPIC_FLAG_EXEC_STACK 0x00000010 /* T if stack to be executable */
|
||||
#define ELF_FDPIC_FLAG_NOEXEC_STACK 0x00000020 /* T if stack not to be executable */
|
||||
#define ELF_FDPIC_FLAG_EXECUTABLE 0x00000040 /* T if this object is the executable */
|
||||
#define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params,
|
||||
struct elf_fdpic_params *interp_params,
|
||||
unsigned long *start_stack,
|
||||
unsigned long *start_brk);
|
||||
#endif
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_ELF_FDPIC_H */
|
||||
#endif /* _UAPI_LINUX_ELF_FDPIC_H */
|
||||
|
|
Loading…
Reference in New Issue
Block a user