From: Andy P. <at...@us...> - 2001-01-23 16:51:11
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv10632/asm-vax Modified Files: init.h ptrace.h user.h Added Files: elf.h Log Message: Add elf.h. Define user_regs_struct in ptrace.h --- NEW FILE --- #ifndef __ASM_VAX_ELF_H #define __ASM_VAX_ELF_H /* * ELF register definitions.. * * added atp Jan 2001. * */ #include <asm/ptrace.h> #include <asm/user.h> #include <linux/utsname.h> typedef unsigned long elf_greg_t; /* 15 general registers plus pc */ #define ELF_NGREG 16 typedef elf_greg_t elf_gregset_t[ELF_NGREG]; /* FIXME: fpregs. */ /* * This is used to ensure we don't load something for the wrong architecture. */ #define elf_check_arch(x) ((x)->e_machine == EM_VAX) /* * These are used to set parameters in the core dumps. */ #define ELF_CLASS ELFCLASS32 #define ELF_DATA ELFDATA2LSB #define ELF_ARCH EM_VAX /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx contains a pointer to a function which might be registered using `atexit'. This provides a mean for the dynamic linker to call DT_FINI functions for shared libraries that have been loaded before the code runs. A value of 0 tells we have no such handler. Alpha uses this as an atexit flag too, and so shall we. */ #define ELF_PLAT_INIT(_r) _r->r0 = 0 #define USE_ELF_CORE_DUMP /* hmm, pagelets.... */ #define ELF_EXEC_PAGESIZE PAGE_SIZE /* This is the location that an ET_DYN program is loaded if exec'ed. Typical use of this is to invoke "./ld.so someprog" to test out a new version of the loader. We need to make sure that it is out of the way of the program that it will "exec", and that there is sufficient room for the brk. */ /* FIXME: A more sensible solution, given our need to keep virtual * address space reasonably contiguous would be good. atp jan 2001 */ #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) /* Wow, the "main" arch needs arch dependent functions too.. :) */ /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is now struct_user_regs, they are different) * - atp at present (jan 2001) struct pt_regs and struct user_regs_struct * (see ptrace.h and user.h) are both the same. So this is a null op really. * However I'm keeping it here for when we need to modify it. */ #define ELF_CORE_COPY_REGS(pr_reg, regs) \ pr_reg[0] = regs->r0; \ pr_reg[1] = regs->r1; \ pr_reg[2] = regs->r2; \ pr_reg[3] = regs->r3; \ pr_reg[4] = regs->r4; \ pr_reg[5] = regs->r5; \ pr_reg[6] = regs->r6; \ pr_reg[7] = regs->r7; \ pr_reg[8] = regs->r8; \ pr_reg[9] = regs->r9; \ pr_reg[10] = regs->r10; \ pr_reg[11] = regs->r11; \ pr_reg[12] = regs->ap; \ pr_reg[13] = regs->fp; \ pr_reg[14] = regs->sp; \ pr_reg[15] = regs->pc; \ pr_reg[16] = regs->psl; /* This yields a mask that user programs can use to figure out what instruction set this CPU supports. This could be done in user space, but it's not easy, and we've already done it here. */ /* FIXME: This needs an addition to the vax mv structure, * if there is any point in testing for subsetting etc..*/ #define ELF_HWCAP (0) /* This yields a string that ld.so will use to load implementation specific libraries for optimization. This is more specific in intent than poking at uname or /proc/cpuinfo. For the moment, we have only optimizations for the Intel generations, but that could change... */ #define ELF_PLATFORM (system_utsname.machine) #ifdef __KERNEL__ #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) #endif #endif Index: init.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/init.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** init.h 2001/01/17 16:18:52 1.1 --- init.h 2001/01/23 16:51:27 1.2 *************** *** 15,19 **** #endif ! #define __cacheline_aligned __attribute__((__aligned__(32))) #endif --- 15,20 ---- #endif ! /* This is now defined in linux/cache.h */ ! /* #define __cacheline_aligned __attribute__((__aligned__(32))) */ #endif Index: ptrace.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/ptrace.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ptrace.h 2001/01/17 16:18:52 1.1 --- ptrace.h 2001/01/23 16:51:27 1.2 *************** *** 27,30 **** --- 27,35 ---- }; + /* ok, this may need a FIXME: later. user_regs_struct is the + * regs structure expected by userspace. see comment in asm-i386/user.h */ + + typedef struct pt_regs user_regs_struct; + /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ #define PTRACE_GETREGS 12 Index: user.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/user.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** user.h 2001/01/17 16:18:52 1.1 --- user.h 2001/01/23 16:51:27 1.2 *************** *** 50,52 **** #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ! #endif /* _ALPHA_USER_H */ --- 50,52 ---- #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ! #endif /* __VAX_USER_H */ |