|
From: <sv...@va...> - 2006-09-30 01:51:31
|
Author: sewardj
Date: 2006-09-30 02:51:26 +0100 (Sat, 30 Sep 2006)
New Revision: 6092
Log:
AIX5 kernel-interface stuff.
Added:
branches/AIX5/auxprogs/aix5_VKI_info.c
branches/AIX5/include/vki/vki-ppc32-aix5.h
branches/AIX5/include/vki/vki-ppc64-aix5.h
Added: branches/AIX5/auxprogs/aix5_VKI_info.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/auxprogs/aix5_VKI_info.c (rev 0=
)
+++ branches/AIX5/auxprogs/aix5_VKI_info.c 2006-09-30 01:51:26 UTC (rev 6=
092)
@@ -0,0 +1,336 @@
+
+/* Used to generate include/vki/vki-ppc{32,64}-aix5.h. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <errno.h>
+#include <string.h>
+#include <time.h>
+#include <sys/ptrace.h>
+#include <sys/uio.h>
+#include <sys/ioctl.h>
+
+#undef offsetof
+
+/* This is so useful it should be visible absolutely everywhere. */
+#if !defined(offsetof)
+# define offsetof(type,memb) ((int)&((type*)0)->memb)
+#endif
+
+
+int main ( void )
+{
+ printf ("aix5_VKI_info: sizeof(void*) =3D %d\n", (int)sizeof(void*));
+
+ printf("/* ---------------- Errors ---------------- */\n");
+ printf("\n");
+ printf("#define VKI_EINVAL %d\n", EINVAL);
+ printf("#define VKI_EINTR %d\n", EINTR);
+ printf("#define VKI_ENOSYS %d\n", ENOSYS);
+ printf("#define VKI_EAGAIN %d\n", EAGAIN);
+ printf("#define VKI_ENOMEM %d\n", ENOMEM);
+ printf("#define VKI_EACCES %d\n", EACCES);
+ printf("#define VKI_EEXIST %d\n", EEXIST);
+ printf("#define VKI_EPERM %d\n", EPERM);
+ printf("#define VKI_ENOENT %d\n", ENOENT);
+ printf("#define VKI_ESRCH %d\n", ESRCH);
+ printf("#define VKI_EBADF %d\n", EBADF);
+ printf("#define VKI_EFAULT %d\n", EFAULT);
+ printf("#define VKI_EMFILE %d\n", EMFILE);
+ printf("#define VKI_ECHILD %d\n", ECHILD);
+ printf("\n");
+ printf("/* ---------------- File I/O ---------------- */\n");
+ printf("\n");
+ printf("#define VKI_O_WRONLY 0x%08x\n", O_WRONLY);
+ printf("#define VKI_O_RDONLY 0x%08x\n", O_RDONLY);
+ printf("#define VKI_O_APPEND 0x%08x\n", O_APPEND);
+ printf("#define VKI_O_CREAT 0x%08x\n", O_CREAT);
+ printf("#define VKI_O_RDWR 0x%08x\n", O_RDWR);
+ printf("#define VKI_O_EXCL 0x%08x\n", O_EXCL);
+ printf("#define VKI_O_TRUNC 0x%08x\n", O_TRUNC);
+ printf("\n");
+ printf("#define VKI_S_IRUSR 0x%08x\n", S_IRUSR);
+ printf("#define VKI_S_IXUSR 0x%08x\n", S_IXUSR);
+ printf("#define VKI_S_IXGRP 0x%08x\n", S_IXGRP);
+ printf("#define VKI_S_IXOTH 0x%08x\n", S_IXOTH);
+ printf("#define VKI_S_IWUSR 0x%08x\n", S_IWUSR);
+ printf("#define VKI_S_ISUID 0x%08x\n", S_ISUID);
+ printf("#define VKI_S_ISGID 0x%08x\n", S_ISGID);
+ printf("#define VKI_S_IFMT 0x%08x\n", S_IFMT);
+ printf("#define VKI_S_IFDIR 0x%08x\n", S_IFDIR);
+ printf("\n");
+ printf("#define VKI_F_DUPFD 0x%08x\n", F_DUPFD);
+ printf("#define VKI_F_SETFD 0x%08x\n", F_SETFD);
+ printf("#define VKI_FD_CLOEXEC 0x%08x\n", FD_CLOEXEC);
+ printf("\n");
+ printf("#define VKI_R_OK 0x%08x\n", R_OK);
+ printf("#define VKI_W_OK 0x%08x\n", W_OK);
+ printf("#define VKI_X_OK 0x%08x\n", X_OK);
+
+ /* info about struct stat */
+ struct stat st;
+ printf("\nsizeof(struct stat) =3D %d\n", (int)sizeof(struct stat));
+
+ printf(" st_size: off %2d sz %d\n",=20
+ offsetof(struct stat, st_size),
+ (int)sizeof(st.st_size));
+
+ printf(" st_mode: off %2d sz %d\n",=20
+ offsetof(struct stat, st_mode),
+ (int)sizeof(st.st_mode));
+
+ printf(" st_uid: off %2d sz %d\n",=20
+ offsetof(struct stat, st_uid),
+ (int)sizeof(st.st_uid));
+
+ printf(" st_gid: off %2d sz %d\n",=20
+ offsetof(struct stat, st_gid),
+ (int)sizeof(st.st_gid));
+
+ printf(" st_dev: off %2d sz %d\n",=20
+ offsetof(struct stat, st_dev),
+ (int)sizeof(st.st_dev));
+
+ printf(" st_ino: off %2d sz %d\n",=20
+ offsetof(struct stat, st_ino),
+ (int)sizeof(st.st_ino));
+
+ printf("\n");
+ printf("#define VKI_STX_NORMAL %d\n", (int)STX_NORMAL);
+ printf("\n");
+ printf("sizeof(size_t) =3D %d\n", (int)sizeof(size_t) );
+ printf("\n");
+ printf("#define VKI_SEEK_SET %d\n", SEEK_SET);
+ printf("#define VKI_PATH_MAX %d\n", PATH_MAX);
+
+ /* info about struct iovec */
+ struct iovec iov;
+ printf("\nsizeof(struct iovec) =3D %d\n", (int)sizeof(struct iovec));
+ printf(" iov_base: off %2d sz %d\n",=20
+ offsetof(struct iovec, iov_base),
+ (int)sizeof(iov.iov_base));
+ printf(" iov_len: off %2d sz %d\n",=20
+ offsetof(struct iovec, iov_len),
+ (int)sizeof(iov.iov_len));
+
+ printf("\n");
+ printf("#define _VKI_IOC_NONE %d\n", 3 & (IOC_VOID >> 30));
+ printf("#define _VKI_IOC_READ %d\n", 3 & (IOC_OUT >> 30));
+ printf("#define _VKI_IOC_WRITE %d\n", 3 & (IOC_IN >> 30));
+ printf("\n");
+ printf("/* ---------------- MMappery ---------------- */\n");
+ printf("\n");
+ printf("#define VKI_PAGE_SIZE %d\n", (int)sysconf(_SC_PAGESIZE));
+ printf("\n");
+ printf("#define VKI_PROT_NONE 0x%08x\n", PROT_NONE);
+ printf("#define VKI_PROT_READ 0x%08x\n", PROT_READ);
+ printf("#define VKI_PROT_WRITE 0x%08x\n", PROT_WRITE);
+ printf("#define VKI_PROT_EXEC 0x%08x\n", PROT_EXEC);
+ printf("\n");
+ printf("#define VKI_MAP_FIXED 0x%08x\n", MAP_FIXED);
+ printf("#define VKI_MAP_PRIVATE 0x%08x\n", MAP_PRIVATE);
+ printf("#define VKI_MAP_ANONYMOUS 0x%08x\n", MAP_ANONYMOUS);
+ printf("\n");
+ printf("/* ---------------- RLimitery ---------------- */\n");
+ printf("\n");
+ printf("#define VKI_RLIMIT_DATA 0x%08x\n", RLIMIT_DATA);
+ printf("#define VKI_RLIMIT_NOFILE 0x%08x\n", RLIMIT_NOFILE);
+ printf("#define VKI_RLIMIT_STACK 0x%08x\n", RLIMIT_STACK);
+ printf("#define VKI_RLIMIT_CORE 0x%08x\n", RLIMIT_CORE);
+
+ /* info about struct rlimit */
+ struct rlimit rl;
+ printf("\nsizeof(struct rlimit) =3D %d\n", (int)sizeof(struct rlimit)=
);
+ printf(" rlim_cur: off %2d sz %d\n",=20
+ offsetof(struct rlimit, rlim_cur),
+ (int)sizeof(rl.rlim_cur));
+ printf(" rlim_max: off %2d sz %d\n",=20
+ offsetof(struct rlimit, rlim_max),
+ (int)sizeof(rl.rlim_max));
+ printf("\n");
+ printf("/* ---------------- Time ---------------- */\n");
+ printf("\n");
+
+ /* print info about struct timeval */
+ struct timeval tv;
+ printf("sizeof(struct timeval) =3D %d\n", (int)sizeof(struct timeval)=
);
+ printf(" tv_sec: off %2d sz %d\n",=20
+ offsetof(struct timeval, tv_sec),
+ (int)sizeof(tv.tv_sec));
+ printf(" tv_usec: off %2d sz %d\n",=20
+ offsetof(struct timeval, tv_usec),
+ (int)sizeof(tv.tv_usec));
+
+ /* print info about struct timespec */
+ struct timespec ts;
+ printf("\nsizeof(struct timespec) =3D %d\n", (int)sizeof(struct times=
pec));
+ printf(" tv_sec: off %2d sz %d\n",=20
+ offsetof(struct timespec, tv_sec),
+ (int)sizeof(ts.tv_sec));
+ printf(" tv_nsec: off %2d sz %d\n",=20
+ offsetof(struct timespec, tv_nsec),
+ (int)sizeof(ts.tv_nsec));
+
+ printf("\n");
+ printf("/* ---------------- Signals ---------------- */\n");
+ printf("\n");
+ printf("#define _VKI_NSIG %ld\n", 8 * sizeof(sigset_t) );
+ printf("\n");
+ printf("#define VKI_SIGSEGV %d\n", SIGSEGV);
+ printf("#define VKI_SIGBUS %d\n", SIGBUS);
+ printf("#define VKI_SIGFPE %d\n", SIGFPE);
+ printf("#define VKI_SIGHUP %d\n", SIGHUP);
+ printf("#define VKI_SIGINT %d\n", SIGINT);
+ printf("#define VKI_SIGQUIT %d\n", SIGQUIT);
+ printf("#define VKI_SIGABRT %d\n", SIGABRT);
+ printf("#define VKI_SIGUSR1 %d\n", SIGUSR1);
+ printf("#define VKI_SIGUSR2 %d\n", SIGUSR2);
+ printf("#define VKI_SIGPIPE %d\n", SIGPIPE);
+ printf("#define VKI_SIGALRM %d\n", SIGALRM);
+ printf("#define VKI_SIGTERM %d\n", SIGTERM);
+ printf("/* VKI_SIGSTKFLT does not exist on AIX 5.2 */\n");
+ printf("#define VKI_SIGTTIN %d\n", SIGTTIN);
+ printf("#define VKI_SIGTTOU %d\n", SIGTTOU);
+ printf("#define VKI_SIGXCPU %d\n", SIGXCPU);
+ printf("#define VKI_SIGXFSZ %d\n", SIGXFSZ);
+ printf("#define VKI_SIGVTALRM %d\n", SIGVTALRM);
+ printf("#define VKI_SIGPROF %d\n", SIGPROF);
+ printf("#define VKI_SIGIO %d\n", SIGIO);
+ printf("#define VKI_SIGPWR %d\n", SIGPWR);
+ printf("/* VKI_SIGUNUSED does not exist on AIX 5.2 */\n");
+ printf("#define VKI_SIGRTMIN %d\n", SIGRTMIN);
+ printf("#define VKI_SIGRTMAX %d\n", SIGRTMAX);
+ printf("#define VKI_SIGTRAP %d\n", SIGTRAP);
+ printf("#define VKI_SIGCONT %d\n", SIGCONT);
+ printf("#define VKI_SIGCHLD %d\n", SIGCHLD);
+ printf("#define VKI_SIGWINCH %d\n", SIGWINCH);
+ printf("#define VKI_SIGURG %d\n", SIGURG);
+ printf("#define VKI_SIGILL %d\n", SIGILL);
+ printf("#define VKI_SIGSTOP %d\n", SIGSTOP);
+ printf("#define VKI_SIGKILL %d\n", SIGKILL);
+ printf("#define VKI_SIGTSTP %d\n", SIGTSTP);
+ printf("#define VKI_SIGSYS %d\n", SIGSYS);
+
+ /* print info about struct sigaction */
+ struct sigaction sa;
+ printf("\n");
+ printf("sizeof(struct sigaction) =3D %d\n", (int)sizeof(struct sigact=
ion));
+ printf(" sa_handler: off %2d sz %d\n",=20
+ offsetof(struct sigaction, sa_handler),
+ (int)sizeof(sa.sa_handler));
+ printf(" sa_mask: off %2d sz %d\n",=20
+ offsetof(struct sigaction, sa_mask),
+ (int)sizeof(sa.sa_mask));
+ printf(" sa_flags: off %2d sz %d\n",=20
+ offsetof(struct sigaction, sa_flags),
+ (int)sizeof(sa.sa_flags));
+ printf("sa_sigaction: off %2d sz %d\n",=20
+ offsetof(struct sigaction, sa_sigaction),
+ (int)sizeof(sa.sa_sigaction));
+ printf("\n");
+ printf("#define VKI_SA_ONSTACK %d\n",SA_ONSTACK );
+ printf("#define VKI_SA_RESTART %d\n",SA_RESTART );
+ printf("#define VKI_SA_RESETHAND %d\n",SA_RESETHAND );
+ printf("#define VKI_SA_SIGINFO %d\n",SA_SIGINFO);
+ printf("#define VKI_SA_NODEFER %d\n",SA_NODEFER );
+ // printf("#define VKI_SA_NOMASK %d\n",SA_NOMASK ) ;
+ // printf("#define VKI_SA_ONESHOT %d\n",SA_ONESHOT );
+ printf("#define VKI_SA_NOCLDSTOP %d\n",SA_NOCLDSTOP );
+ printf("#define VKI_SA_NOCLDWAIT %d\n",SA_NOCLDWAIT );
+ // printf("#define VKI_SA_RESTORER %d\n",SA_RESTORER );
+ printf("\n");
+ printf("#define VKI_SS_ONSTACK %d\n",SS_ONSTACK );
+ printf("#define VKI_SS_DISABLE %d\n",SS_DISABLE );
+ printf("\n");
+ printf("#define VKI_MINSIGSTKSZ %ld\n",MINSIGSTKSZ );
+ printf("\n");
+ printf("#define VKI_SI_USER %d\n",SI_USER );
+ printf("\n");
+ printf("#define VKI_SIG_BLOCK %d\n",SIG_BLOCK );
+ printf("#define VKI_SIG_SETMASK %d\n",SIG_SETMASK );
+ printf("#define VKI_SIG_UNBLOCK %d\n",SIG_UNBLOCK );
+ printf("#define VKI_SIG_IGN (void*)%d\n",(int)SIG_IGN );
+ printf("#define VKI_SIG_DFL (void*)%d\n",(int)SIG_DFL );
+ printf("\n");
+ // printf("#define VKI_SI_TKILL %d\n",SI_TKILL );
+ printf("#define VKI_SI_USER %d\n",SI_USER );
+ printf("\n");
+ printf("#define VKI_SEGV_ACCERR %d\n", SEGV_ACCERR);
+ printf("#define VKI_SEGV_MAPERR %d\n", SEGV_MAPERR);
+ printf("\n");
+ printf("#define VKI_TRAP_TRACE %d\n", TRAP_TRACE);
+ printf("#define VKI_BUS_OBJERR %d\n", BUS_OBJERR);
+ printf("#define VKI_BUS_ADRERR %d\n", BUS_ADRERR);
+ printf("#define VKI_BUS_ADRALN %d\n", BUS_ADRALN);
+ printf("#define VKI_FPE_FLTSUB %d\n", FPE_FLTSUB);
+ printf("#define VKI_FPE_FLTINV %d\n", FPE_FLTINV);
+ printf("#define VKI_FPE_FLTRES %d\n", FPE_FLTRES);
+ printf("#define VKI_FPE_FLTUND %d\n", FPE_FLTUND);
+ printf("#define VKI_FPE_FLTOVF %d\n", FPE_FLTOVF);
+ printf("#define VKI_FPE_FLTDIV %d\n", FPE_FLTDIV);
+ printf("#define VKI_FPE_INTOVF %d\n", FPE_INTOVF);
+ printf("#define VKI_FPE_INTDIV %d\n", FPE_INTDIV);
+ printf("\n");
+ printf("#define VKI_ILL_BADSTK %d\n", ILL_BADSTK);
+ printf("#define VKI_ILL_COPROC %d\n", ILL_COPROC);
+ printf("#define VKI_ILL_PRVREG %d\n", ILL_PRVREG);
+ printf("#define VKI_ILL_PRVOPC %d\n", ILL_PRVOPC);
+ printf("#define VKI_ILL_ILLTRP %d\n", ILL_ILLTRP);
+ printf("#define VKI_ILL_ILLADR %d\n", ILL_ILLADR);
+ printf("#define VKI_ILL_ILLOPN %d\n", ILL_ILLOPN);
+ printf("#define VKI_ILL_ILLOPC %d\n", ILL_ILLOPC);
+
+ /* info about siginfo_t */
+ siginfo_t si;
+ printf("\nsizeof(siginfo_t) =3D %d\n", (int)sizeof(siginfo_t));
+ printf(" si_signo: off %2d sz %d\n",=20
+ offsetof(siginfo_t, si_signo),
+ (int)sizeof(si.si_signo));
+ printf(" si_code: off %2d sz %d\n",=20
+ offsetof(siginfo_t, si_code),
+ (int)sizeof(si.si_code));
+ printf(" si_pid: off %2d sz %d\n",
+ offsetof(siginfo_t, si_pid),
+ (int)sizeof(si.si_pid));
+ printf(" si_addr: off %2d sz %d\n",=20
+ offsetof(siginfo_t, si_addr),
+ (int)sizeof(si.si_addr));
+
+ /* info about sigaltstack */
+ stack_t ss;
+ printf("\nsizeof(stack_t) =3D %d\n", (int)sizeof(stack_t));
+ printf(" ss_sp: off %2d sz %d\n",=20
+ offsetof(stack_t, ss_sp),
+ (int)sizeof(ss.ss_sp));
+ printf(" ss_size: off %2d sz %d\n",=20
+ offsetof(stack_t, ss_size),
+ (int)sizeof(ss.ss_size));
+ printf(" ss_flags: off %2d sz %d\n",=20
+ offsetof(stack_t, ss_flags),
+ (int)sizeof(ss.ss_flags));
+
+ printf("\n");
+ printf("/* ---------------- Misc ---------------- */\n");
+ printf("\n");
+ printf("#define VKI_PTRACE_TRACEME %d\n", PT_TRACE_ME);
+ printf("#define VKI_PTRACE_DETACH %d\n", PT_DETACH);
+ printf("\n");
+
+#if 0
+ printf("#define VKI_ %d\n", );
+ printf("#define VKI_ %d\n", );
+ printf("#define VKI_ %d\n", );
+ printf("#define VKI_ %d\n", );
+
+ printf("#define VKI_ 0x%08x\n", );
+ printf("#define VKI_ 0x%08x\n", );
+ printf("#define VKI_ 0x%08x\n", );
+ printf("#define VKI_ 0x%08x\n", );
+#endif
+ return 0;
+}
Added: branches/AIX5/include/vki/vki-ppc32-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-ppc32-aix5.h (r=
ev 0)
+++ branches/AIX5/include/vki/vki-ppc32-aix5.h 2006-09-30 01:51:26 UTC (r=
ev 6092)
@@ -0,0 +1,450 @@
+
+/*--------------------------------------------------------------------*/
+/*--- 32-bit AIX5-specific kernel interface. vki-ppc32-aix5.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2006 OpenWorks LLP
+ in...@op...
+
+ 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.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+/* This file defines types and constants for the kernel interface, and t=
o
+ make that clear everything is prefixed VKI_/vki_.
+*/
+
+/* This file was generated by running auxprogs/aix5_VKI_info.c. */
+
+#ifndef __VKI_PPC32_AIX5_H
+#define __VKI_PPC32_AIX5_H
+
+#if !defined(VGP_ppc32_aix5)
+# error This file should be included in 32-bit AIX5 builds only.
+#endif
+
+//--------------------------------------------------------------
+// VERIFIED
+//--------------------------------------------------------------
+
+/* ---------------- Errors ---------------- */
+
+#define VKI_EINVAL 22
+#define VKI_EINTR 4
+#define VKI_ENOSYS 109
+#define VKI_EAGAIN 11
+#define VKI_ENOMEM 12
+#define VKI_EACCES 13
+#define VKI_EEXIST 17
+#define VKI_EPERM 1
+#define VKI_ENOENT 2
+#define VKI_ESRCH 3
+#define VKI_EBADF 9
+#define VKI_EFAULT 14
+#define VKI_EMFILE 24
+#define VKI_ECHILD 10
+#define VKI_ERESTARTSYS 0 /* AIX doesn't have this */
+
+/* ---------------- File I/O ---------------- */
+
+#define VKI_O_WRONLY 0x00000001
+#define VKI_O_RDONLY 0x00000000
+#define VKI_O_APPEND 0x00000008
+#define VKI_O_CREAT 0x00000100
+#define VKI_O_RDWR 0x00000002
+#define VKI_O_EXCL 0x00000400
+#define VKI_O_TRUNC 0x00000200
+
+#define VKI_S_IRUSR 0x00000100
+#define VKI_S_IXUSR 0x00000040
+#define VKI_S_IXGRP 0x00000008
+#define VKI_S_IXOTH 0x00000001
+#define VKI_S_IWUSR 0x00000080
+#define VKI_S_ISUID 0x00000800
+#define VKI_S_ISGID 0x00000400
+#define VKI_S_IFMT 0x0000f000
+#define VKI_S_IFDIR 0x00004000
+#define VKI_S_ISDIR(m) (((m) & VKI_S_IFMT) =3D=3D VKI_S_IFDIR)
+
+#define VKI_F_DUPFD 0x00000000
+#define VKI_F_SETFD 0x00000002
+#define VKI_FD_CLOEXEC 0x00000001
+
+#define VKI_R_OK 0x00000004
+#define VKI_W_OK 0x00000002
+#define VKI_X_OK 0x00000001
+
+/* Known:
+ sizeof(struct stat) =3D 116
+ st_dev: off 0 sz 4
+ st_ino: off 4 sz 4
+ st_mode: off 8 sz 4
+ st_uid: off 16 sz 4
+ st_gid: off 20 sz 4
+ st_size: off 28 sz 4
+*/
+struct vki_stat {
+ /* 0 */ UInt st_dev;
+ /* 4 */ UInt st_ino;
+ /* 8 */ UInt st_mode;
+ /* 12 */ UInt __off12;
+ /* 16 */ UInt st_uid;
+ /* 20 */ UInt st_gid;
+ /* 24 */ UInt __off24;
+ /* 28 */ UInt st_size;
+ /* 32 */ UChar __off32[116-32];
+};
+
+#define VKI_STX_NORMAL 0
+
+typedef UInt vki_size_t;
+
+#define VKI_SEEK_SET 0
+#define VKI_PATH_MAX 1023
+
+/* Known:
+ sizeof(struct iovec) =3D 8
+ iov_base: off 0 sz 4
+ iov_len: off 4 sz 4
+*/
+struct vki_iovec {
+ /* 0 */ Addr iov_base;
+ /* 4 */ UInt iov_len;
+};
+
+#define _VKI_IOC_NONE 0
+#define _VKI_IOC_READ 1 /* kernel reads, userspace writes */
+#define _VKI_IOC_WRITE 2 /* kernel writes, userspace reads */
+#define _VKI_IOC_DIR(_x) (((_x) >> 30) & 3)
+#define _VKI_IOC_SIZE(_x) (((_x) >> 16) & 0x7F)
+
+/* ---------------- MMappery ---------------- */
+
+#define VKI_PAGE_SIZE 4096 /* this is checked by the launcher */
+
+#define VKI_PROT_NONE 0x00000000
+#define VKI_PROT_READ 0x00000001
+#define VKI_PROT_WRITE 0x00000002
+#define VKI_PROT_EXEC 0x00000004
+
+#define VKI_MAP_FIXED 0x00000100
+#define VKI_MAP_PRIVATE 0x00000002
+#define VKI_MAP_ANONYMOUS 0x00000010
+
+/* ---------------- RLimitery ---------------- */
+
+/* rlimit: these pertain to syscall "appgetrlimit" */
+#define VKI_RLIMIT_DATA 0x00000002
+#define VKI_RLIMIT_NOFILE 0x00000007
+#define VKI_RLIMIT_STACK 0x00000003
+#define VKI_RLIMIT_CORE 0x00000004
+
+/* Known:
+ sizeof(struct rlimit) =3D 8
+ rlim_cur: off 0 sz 4
+ rlim_max: off 4 sz 4
+*/
+struct vki_rlimit {
+ UInt rlim_cur;
+ UInt rlim_max;
+};
+
+/* ---------------- Time ---------------- */
+
+/* Known:
+ sizeof(struct timeval) =3D 8
+ tv_sec: off 0 sz 4
+ tv_usec: off 4 sz 4
+*/
+struct vki_timeval {
+ UInt tv_sec; /* seconds */
+ UInt tv_usec; /* microseconds */
+};
+
+/* Known:
+ sizeof(struct timespec) =3D 8
+ tv_sec: off 0 sz 4
+ tv_nsec: off 4 sz 4
+*/
+struct vki_timespec {
+ UInt tv_sec; /* seconds */
+ UInt tv_nsec; /* nanoseconds */
+};
+
+/* ---------------- Signals ---------------- */
+
+/* This layout verified 27 July 06. */
+#define _VKI_NSIG_BPW 32
+#define _VKI_NSIG 64
+#define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW)
+
+typedef struct {
+ UInt sig[_VKI_NSIG_WORDS];
+} vki_sigset_t;
+
+#define VKI_SIGSEGV 11
+#define VKI_SIGBUS 10
+#define VKI_SIGFPE 8
+#define VKI_SIGHUP 1
+#define VKI_SIGINT 2
+#define VKI_SIGQUIT 3
+#define VKI_SIGABRT 6
+#define VKI_SIGUSR1 30
+#define VKI_SIGUSR2 31
+#define VKI_SIGPIPE 13
+#define VKI_SIGALRM 14
+#define VKI_SIGTERM 15
+/* VKI_SIGSTKFLT does not exist on AIX 5.2 */
+#define VKI_SIGTTIN 21
+#define VKI_SIGTTOU 22
+#define VKI_SIGXCPU 24
+#define VKI_SIGXFSZ 25
+#define VKI_SIGVTALRM 34
+#define VKI_SIGPROF 32
+#define VKI_SIGIO 23
+#define VKI_SIGPWR 29
+/* VKI_SIGUNUSED does not exist on AIX 5.2 */
+#define VKI_SIGRTMIN 50
+#define VKI_SIGRTMAX 57
+#define VKI_SIGTRAP 5
+#define VKI_SIGCONT 19
+#define VKI_SIGCHLD 20
+#define VKI_SIGWINCH 28
+#define VKI_SIGURG 16
+#define VKI_SIGILL 4
+#define VKI_SIGSTOP 17
+#define VKI_SIGKILL 9
+#define VKI_SIGTSTP 18
+#define VKI_SIGSYS 12
+
+/* Known:
+ sizeof(struct sigaction) =3D 16
+ sa_handler: off 0 sz 4
+ sa_mask: off 4 sz 8
+ sa_flags: off 12 sz 4
+ sa_sigaction: off 0 sz 4
+*/
+struct vki_sigaction {
+ void* ksa_handler;
+ vki_sigset_t sa_mask;
+ UInt sa_flags;
+};
+
+#define VKI_SA_ONSTACK 1
+#define VKI_SA_RESTART 8
+#define VKI_SA_RESETHAND 2
+#define VKI_SA_SIGINFO 256
+#define VKI_SA_NODEFER 512
+#define VKI_SA_NOCLDSTOP 4
+#define VKI_SA_NOCLDWAIT 1024
+
+#define VKI_SA_RESTORER 0 /* AIX doesn't have this */
+#define VKI_SA_NOMASK 0 /* AIX doesn't have this */
+#define VKI_SA_ONESHOT 0 /* AIX doesn't have this */
+
+#define VKI_SS_ONSTACK 1
+#define VKI_SS_DISABLE 2
+
+#define VKI_MINSIGSTKSZ 1168
+
+#define VKI_SI_TKILL 0 /* AIX doesn't have this */
+#define VKI_SI_USER 0 /* but it does have this */
+
+#define VKI_SIG_BLOCK 0
+#define VKI_SIG_SETMASK 2
+#define VKI_SIG_UNBLOCK 1
+#define VKI_SIG_IGN (void*)1
+#define VKI_SIG_DFL (void*)0
+
+#define VKI_SEGV_ACCERR 51
+#define VKI_SEGV_MAPERR 50
+
+#define VKI_TRAP_TRACE 61
+#define VKI_BUS_OBJERR 3
+#define VKI_BUS_ADRERR 2
+#define VKI_BUS_ADRALN 1
+#define VKI_FPE_FLTSUB 27
+#define VKI_FPE_FLTINV 26
+#define VKI_FPE_FLTRES 25
+#define VKI_FPE_FLTUND 24
+#define VKI_FPE_FLTOVF 23
+#define VKI_FPE_FLTDIV 22
+#define VKI_FPE_INTOVF 21
+#define VKI_FPE_INTDIV 20
+#define VKI_ILL_BADSTK 37
+#define VKI_ILL_COPROC 36
+#define VKI_ILL_PRVREG 35
+#define VKI_ILL_PRVOPC 34
+#define VKI_ILL_ILLTRP 33
+#define VKI_ILL_ILLADR 32
+#define VKI_ILL_ILLOPN 31
+#define VKI_ILL_ILLOPC 30
+
+/* Known:=20
+ sizeof(siginfo_t) =3D 64
+ si_signo: off 0 sz 4
+ si_code: off 8 sz 4
+ si_pid: off 12 sz 4
+ si_addr: off 20 sz 4
+*/
+typedef struct {
+ UInt si_signo;
+ UInt __off4;
+ UInt si_code;
+ UInt si_pid;
+ UInt __off16;
+ void* si_addr;
+ UInt __off24;
+ UInt __off28;
+ UInt __off32;
+ UInt __off36;
+ UInt __off40;
+ UInt __off44;
+ UInt __off48;
+ UInt __off52;
+ UInt __off56;
+ UInt __off60;
+} vki_siginfo_t;
+
+/* Known:
+ sizeof(stack_t) =3D 28
+ ss_sp: off 0 sz 4
+ ss_size: off 4 sz 4
+ ss_flags: off 8 sz 4
+*/
+typedef struct vki_sigaltstack {
+ /* 0 */ void* ss_sp;
+ /* 4 */ UInt ss_size;
+ /* 8 */ UInt ss_flags;
+ /* 12 */ UInt __off12;
+ /* 16 */ UInt __off16;
+ /* 20 */ UInt __off20;
+ /* 24 */ UInt __off24;
+} vki_stack_t;
+
+/* ---------------- Misc ---------------- */
+
+#define VKI_PTRACE_TRACEME 0 /* nb: is really PT_TRACE_ME */
+#define VKI_PTRACE_DETACH 31 /* nb: is really PT_DETACH */
+
+
+//--------------------------------------------------------------
+// BOGUS
+//--------------------------------------------------------------
+
+struct vki_dirent {
+ int bogus;
+};
+
+struct vki_sockaddr {
+ int bogus;
+};
+
+struct vki_pollfd {
+ int bogus;
+};
+
+/* Structure describing an Internet (IP) socket address. */
+//struct vki_sockaddr_in {
+// int bogus;
+//};
+
+struct vki_ucontext {
+ int bogus;
+};
+
+
+//--------------------------------------------------------------
+// FROM glibc-ports-2.4/sysdeps/unix/sysv/aix/dlldr.h
+//--------------------------------------------------------------
+
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/*
+
+ int __loadx(flag, module, arg1, arg2, arg3)
+
+ The __loadx() is a call to ld_loadutil() kernel function, which
+ does the real work. Note ld_loadutil() is not exported an cannot be
+ called directly from user space.
+
+ void *ld_loadutil() call is a utility function used for loader extensio=
ns
+ supporting run-time linking and dl*() functions.
+
+ void * - will return the modules entry point if it succeds of NULL
+ on failure.
+
+ int flag - the flag field performas a dual role: the top 8 bits specify
+ the work for __loadx() to perform, the bottom 8 bits are
+ used to pass flags to the work routines, all other bits are
+ reserved.
+
+*/
+
+#define VKI_DL_LOAD 0x1000000 /* __loadx(flag,buf, buf_len, filena=
me, libr_path) */
+#define VKI_DL_POSTLOADQ 0x2000000 /* __loadx(flag,buf, buf_len, module=
_handle) */
+#define VKI_DL_EXECQ 0x3000000 /* __loadx(flag,buf, buf_len) */
+#define VKI_DL_EXITQ 0x4000000 /* __loadx(flag,buf, buf_len) */
+#define VKI_DL_PREUNLOADQ 0x5000000 /* __loadx(flag,buf, buf_len, module=
_handle) */
+#define VKI_DL_INIT 0x6000000 /* __loadx(flag,NULL) */
+#define VKI_DL_GETSYM 0x7000000 /* __loadx(flag,symbol, index, modul=
es_data_origin) */
+#define VKI_DL_SETDEPEND 0x8000000 /* __loadx(flag,import_data_org, imp=
ort_index, */
+ /* export_data_org, exp=
ort_index) */
+#define VKI_DL_DELDEPEND 0x9000000 /* __loadx(flag,import_data_org, imp=
ort_index, */
+ /* export_data_org, exp=
ort_index) */
+#define VKI_DL_GLOBALSYM 0xA000000 /* __loadx(flag,symbol_name, ptr_to_=
rec_index, */
+ /* ptr_to_rec=
_data_org) */
+#define VKI_DL_UNIX_SYSCALL 0xB000000 /* __loadx(flag,syscall_symbol_nam=
e) */
+
+#define VKI_DL_FUNCTION_MASK 0xFF000000
+#define VKI_DL_SRCHDEPENDS 0x00100000
+#define VKI_DL_SRCHMODULE 0x00080000
+#define VKI_DL_SRCHLOADLIST 0x00040000
+#define VKI_DL_LOAD_LDX1 0x00040000
+#define VKI_DL_LOAD_RTL 0x00020000
+#define VKI_DL_HASHSTRING 0x00020000
+#define VKI_DL_INFO_OK 0x00010000
+#define VKI_DL_LOAD_DLINFO 0x00010000
+#define VKI_DL_UNLOADED 0x00020000
+
+
+#endif // __VKI_PPC32_AIX5_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Added: branches/AIX5/include/vki/vki-ppc64-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-ppc64-aix5.h (r=
ev 0)
+++ branches/AIX5/include/vki/vki-ppc64-aix5.h 2006-09-30 01:51:26 UTC (r=
ev 6092)
@@ -0,0 +1,451 @@
+
+/*--------------------------------------------------------------------*/
+/*--- 64-bit AIX5-specific kernel interface. vki-ppc64-aix5.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2006 OpenWorks LLP
+ in...@op...
+
+ 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.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+/* This file defines types and constants for the kernel interface, and t=
o
+ make that clear everything is prefixed VKI_/vki_.
+*/
+
+/* This file was generated by running auxprogs/aix5_VKI_info.c. */
+
+#ifndef __VKI_PPC64_AIX5_H
+#define __VKI_PPC64_AIX5_H
+
+#if !defined(VGP_ppc64_aix5)
+# error This file should be included in 64-bit AIX5 builds only.
+#endif
+
+//--------------------------------------------------------------
+// VERIFIED
+//--------------------------------------------------------------
+
+/* ---------------- Errors ---------------- */
+
+#define VKI_EINVAL 22
+#define VKI_EINTR 4
+#define VKI_ENOSYS 109
+#define VKI_EAGAIN 11
+#define VKI_ENOMEM 12
+#define VKI_EACCES 13
+#define VKI_EEXIST 17
+#define VKI_EPERM 1
+#define VKI_ENOENT 2
+#define VKI_ESRCH 3
+#define VKI_EBADF 9
+#define VKI_EFAULT 14
+#define VKI_EMFILE 24
+#define VKI_ECHILD 10
+#define VKI_ERESTARTSYS 0 /* AIX doesn't have this */
+
+/* ---------------- File I/O ---------------- */
+
+#define VKI_O_WRONLY 0x00000001
+#define VKI_O_RDONLY 0x00000000
+#define VKI_O_APPEND 0x00000008
+#define VKI_O_CREAT 0x00000100
+#define VKI_O_RDWR 0x00000002
+#define VKI_O_EXCL 0x00000400
+#define VKI_O_TRUNC 0x00000200
+
+#define VKI_S_IRUSR 0x00000100
+#define VKI_S_IXUSR 0x00000040
+#define VKI_S_IXGRP 0x00000008
+#define VKI_S_IXOTH 0x00000001
+#define VKI_S_IWUSR 0x00000080
+#define VKI_S_ISUID 0x00000800
+#define VKI_S_ISGID 0x00000400
+#define VKI_S_IFMT 0x0000f000
+#define VKI_S_IFDIR 0x00004000
+#define VKI_S_ISDIR(m) (((m) & VKI_S_IFMT) =3D=3D VKI_S_IFDIR)
+
+#define VKI_F_DUPFD 0x00000000
+#define VKI_F_SETFD 0x00000002
+#define VKI_FD_CLOEXEC 0x00000001
+
+#define VKI_R_OK 0x00000004
+#define VKI_W_OK 0x00000002
+#define VKI_X_OK 0x00000001
+
+/* Known:
+ sizeof(struct stat) =3D 176
+ st_dev: off 0 sz 8
+ st_ino: off 8 sz 8
+ st_mode: off 16 sz 4
+ st_uid: off 24 sz 4
+ st_gid: off 28 sz 4
+ st_size: off 168 sz 8
+*/
+struct vki_stat {
+ /* 0 */ ULong st_dev;
+ /* 8 */ ULong st_ino;
+ /* 16 */ UInt st_mode;
+ /* 20 */ UInt __off20;
+ /* 24 */ UInt st_uid;
+ /* 28 */ UInt st_gid;
+ /* 32 */ UChar __off28[168-32];
+ /* 168 */ ULong st_size;
+};
+
+#define VKI_STX_NORMAL 0
+
+typedef ULong vki_size_t;
+
+#define VKI_SEEK_SET 0
+#define VKI_PATH_MAX 1023
+
+/* Known:
+ sizeof(struct iovec) =3D 16
+ iov_base: off 0 sz 8
+ iov_len: off 8 sz 8
+
+*/
+struct vki_iovec {
+ /* 0 */ Addr iov_base;
+ /* 8 */ ULong iov_len;
+};
+
+#define _VKI_IOC_NONE 0
+#define _VKI_IOC_READ 1 /* kernel reads, userspace writes */
+#define _VKI_IOC_WRITE 2 /* kernel writes, userspace reads */
+#define _VKI_IOC_DIR(_x) (((_x) >> 30) & 3)
+#define _VKI_IOC_SIZE(_x) (((_x) >> 16) & 0x7F)
+
+/* ---------------- MMappery ---------------- */
+
+#define VKI_PAGE_SIZE 4096 /* this is checked by the launcher */
+
+#define VKI_PROT_NONE 0x00000000
+#define VKI_PROT_READ 0x00000001
+#define VKI_PROT_WRITE 0x00000002
+#define VKI_PROT_EXEC 0x00000004
+
+#define VKI_MAP_FIXED 0x00000100
+#define VKI_MAP_PRIVATE 0x00000002
+#define VKI_MAP_ANONYMOUS 0x00000010
+
+/* ---------------- RLimitery ---------------- */
+
+/* rlimit: these pertain to syscall "appgetrlimit" */
+#define VKI_RLIMIT_DATA 0x00000002
+#define VKI_RLIMIT_NOFILE 0x00000007
+#define VKI_RLIMIT_STACK 0x00000003
+#define VKI_RLIMIT_CORE 0x00000004
+
+/* Known:
+ sizeof(struct rlimit) =3D 16
+ rlim_cur: off 0 sz 8
+ rlim_max: off 8 sz 8
+*/
+struct vki_rlimit {
+ /* 0 */ ULong rlim_cur;
+ /* 8 */ ULong rlim_max;
+};
+
+/* ---------------- Time ---------------- */
+
+/* Known:
+ sizeof(struct timeval) =3D 16
+ tv_sec: off 0 sz 8
+ tv_usec: off 8 sz 4
+*/
+struct vki_timeval {
+ /* 0 */ ULong tv_sec; /* seconds */
+ /* 8 */ UInt tv_usec; /* microseconds */
+ /* 12 */ UInt __off12;
+};
+
+/* Known:
+ sizeof(struct timespec) =3D 16
+ tv_sec: off 0 sz 8
+ tv_nsec: off 8 sz 8
+*/
+struct vki_timespec {
+ /* 0 */ ULong tv_sec; /* seconds */
+ /* 8 */ ULong tv_nsec; /* nanoseconds */
+};
+
+/* ---------------- Signals ---------------- */
+
+/* This layout verified 27 July 06. */
+#define _VKI_NSIG_BPW 64
+#define _VKI_NSIG 256
+#define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW)
+
+typedef struct {
+ ULong sig[_VKI_NSIG_WORDS];
+} vki_sigset_t;
+
+#define VKI_SIGSEGV 11
+#define VKI_SIGBUS 10
+#define VKI_SIGFPE 8
+#define VKI_SIGHUP 1
+#define VKI_SIGINT 2
+#define VKI_SIGQUIT 3
+#define VKI_SIGABRT 6
+#define VKI_SIGUSR1 30
+#define VKI_SIGUSR2 31
+#define VKI_SIGPIPE 13
+#define VKI_SIGALRM 14
+#define VKI_SIGTERM 15
+/* VKI_SIGSTKFLT does not exist on AIX 5.2 */
+#define VKI_SIGTTIN 21
+#define VKI_SIGTTOU 22
+#define VKI_SIGXCPU 24
+#define VKI_SIGXFSZ 25
+#define VKI_SIGVTALRM 34
+#define VKI_SIGPROF 32
+#define VKI_SIGIO 23
+#define VKI_SIGPWR 29
+/* VKI_SIGUNUSED does not exist on AIX 5.2 */
+#define VKI_SIGRTMIN 50
+#define VKI_SIGRTMAX 57
+#define VKI_SIGTRAP 5
+#define VKI_SIGCONT 19
+#define VKI_SIGCHLD 20
+#define VKI_SIGWINCH 28
+#define VKI_SIGURG 16
+#define VKI_SIGILL 4
+#define VKI_SIGSTOP 17
+#define VKI_SIGKILL 9
+#define VKI_SIGTSTP 18
+#define VKI_SIGSYS 12
+
+/* Known:
+ sizeof(struct sigaction) =3D 48
+ sa_sigaction: off 0 sz 8
+ sa_handler: off 0 sz 8
+ sa_mask: off 8 sz 32
+ sa_flags: off 40 sz 4
+*/
+struct vki_sigaction {
+ /* 0 */ void* ksa_handler;
+ /* 8 */ vki_sigset_t sa_mask;
+ /* 40 */ UInt sa_flags;
+ /* 44 */ UInt __off44;
+};
+
+#define VKI_SA_ONSTACK 1
+#define VKI_SA_RESTART 8
+#define VKI_SA_RESETHAND 2
+#define VKI_SA_SIGINFO 256
+#define VKI_SA_NODEFER 512
+#define VKI_SA_NOCLDSTOP 4
+#define VKI_SA_NOCLDWAIT 1024
+
+#define VKI_SA_RESTORER 0 /* AIX doesn't have this */
+#define VKI_SA_NOMASK 0 /* AIX doesn't have this */
+#define VKI_SA_ONESHOT 0 /* AIX doesn't have this */
+
+#define VKI_SS_ONSTACK 1
+#define VKI_SS_DISABLE 2
+
+#define VKI_MINSIGSTKSZ 1200
+
+#define VKI_SI_TKILL 0 /* AIX doesn't have this */
+#define VKI_SI_USER 0 /* but it does have this */
+
+#define VKI_SIG_BLOCK 0
+#define VKI_SIG_SETMASK 2
+#define VKI_SIG_UNBLOCK 1
+#define VKI_SIG_IGN (void*)1
+#define VKI_SIG_DFL (void*)0
+
+#define VKI_SEGV_ACCERR 51
+#define VKI_SEGV_MAPERR 50
+
+#define VKI_TRAP_TRACE 61
+#define VKI_BUS_OBJERR 3
+#define VKI_BUS_ADRERR 2
+#define VKI_BUS_ADRALN 1
+#define VKI_FPE_FLTSUB 27
+#define VKI_FPE_FLTINV 26
+#define VKI_FPE_FLTRES 25
+#define VKI_FPE_FLTUND 24
+#define VKI_FPE_FLTOVF 23
+#define VKI_FPE_FLTDIV 22
+#define VKI_FPE_INTOVF 21
+#define VKI_FPE_INTDIV 20
+
+#define VKI_ILL_BADSTK 37
+#define VKI_ILL_COPROC 36
+#define VKI_ILL_PRVREG 35
+#define VKI_ILL_PRVOPC 34
+#define VKI_ILL_ILLTRP 33
+#define VKI_ILL_ILLADR 32
+#define VKI_ILL_ILLOPN 31
+#define VKI_ILL_ILLOPC 30
+
+/* Known:=20
+ sizeof(siginfo_t) =3D 64
+ si_signo: off 0 sz 4
+ si_code: off 8 sz 4
+ si_pid: off 12 sz 4
+ si_addr: off 24 sz 8
+*/
+typedef struct {
+ /* 0 */ UInt si_signo;
+ /* 4 */ UInt __off4;
+ /* 8 */ UInt si_code;
+ /* 12 */ UInt si_pid;
+ /* 16 */ UInt __off16;
+ /* 20 */ UInt __off20;
+ /* 24 */ void* si_addr;
+ /* 32 */ UInt __off32;
+ /* 36 */ UInt __off36;
+ /* 40 */ UInt __off40;
+ /* 44 */ UInt __off44;
+ /* 48 */ UInt __off48;
+ /* 52 */ UInt __off52;
+ /* 56 */ UInt __off56;
+ /* 60 */ UInt __off60;
+} vki_siginfo_t;
+
+/* Known:
+ sizeof(stack_t) =3D 40
+ ss_sp: off 0 sz 8
+ ss_size: off 8 sz 8
+ ss_flags: off 16 sz 4
+*/
+typedef struct vki_sigaltstack {
+ /* 0 */ void* ss_sp;
+ /* 8 */ ULong ss_size;
+ /* 16 */ UInt ss_flags;
+ /* 20 */ UInt __off20;
+ /* 24 */ ULong __off24;
+ /* 32 */ ULong __off32;
+} vki_stack_t;
+
+/* ---------------- Misc ---------------- */
+
+#define VKI_PTRACE_TRACEME 0 /* nb: is really PT_TRACE_ME */
+#define VKI_PTRACE_DETACH 31 /* nb: is really PT_DETACH */
+
+
+//--------------------------------------------------------------
+// BOGUS
+//--------------------------------------------------------------
+
+struct vki_dirent {
+ int bogus;
+};
+
+struct vki_sockaddr {
+ int bogus;
+};
+
+struct vki_pollfd {
+ int bogus;
+};
+
+/* Structure describing an Internet (IP) socket address. */
+//struct vki_sockaddr_in {
+// int bogus;
+//};
+
+struct vki_ucontext {
+ int bogus;
+};
+
+
+//--------------------------------------------------------------
+// FROM glibc-ports-2.4/sysdeps/unix/sysv/aix/dlldr.h
+//--------------------------------------------------------------
+
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/*
+
+ int __loadx(flag, module, arg1, arg2, arg3)
+
+ The __loadx() is a call to ld_loadutil() kernel function, which
+ does the real work. Note ld_loadutil() is not exported an cannot be
+ called directly from user space.
+
+ void *ld_loadutil() call is a utility function used for loader extensio=
ns
+ supporting run-time linking and dl*() functions.
+
+ void * - will return the modules entry point if it succeds of NULL
+ on failure.
+
+ int flag - the flag field performas a dual role: the top 8 bits specify
+ the work for __loadx() to perform, the bottom 8 bits are
+ used to pass flags to the work routines, all other bits are
+ reserved.
+
+*/
+
+#define VKI_DL_LOAD 0x1000000 /* __loadx(flag,buf, buf_len, filena=
me, libr_path) */
+#define VKI_DL_POSTLOADQ 0x2000000 /* __loadx(flag,buf, buf_len, module=
_handle) */
+#define VKI_DL_EXECQ 0x3000000 /* __loadx(flag,buf, buf_len) */
+#define VKI_DL_EXITQ 0x4000000 /* __loadx(flag,buf, buf_len) */
+#define VKI_DL_PREUNLOADQ 0x5000000 /* __loadx(flag,buf, buf_len, module=
_handle) */
+#define VKI_DL_INIT 0x6000000 /* __loadx(flag,NULL) */
+#define VKI_DL_GETSYM 0x7000000 /* __loadx(flag,symbol, index, modul=
es_data_origin) */
+#define VKI_DL_SETDEPEND 0x8000000 /* __loadx(flag,import_data_org, imp=
ort_index, */
+ /* export_data_org, exp=
ort_index) */
+#define VKI_DL_DELDEPEND 0x9000000 /* __loadx(flag,import_data_org, imp=
ort_index, */
+ /* export_data_org, exp=
ort_index) */
+#define VKI_DL_GLOBALSYM 0xA000000 /* __loadx(flag,symbol_name, ptr_to_=
rec_index, */
+ /* ptr_to_rec=
_data_org) */
+#define VKI_DL_UNIX_SYSCALL 0xB000000 /* __loadx(flag,syscall_symbol_nam=
e) */
+
+#define VKI_DL_FUNCTION_MASK 0xFF000000
+#define VKI_DL_SRCHDEPENDS 0x00100000
+#define VKI_DL_SRCHMODULE 0x00080000
+#define VKI_DL_SRCHLOADLIST 0x00040000
+#define VKI_DL_LOAD_LDX1 0x00040000
+#define VKI_DL_LOAD_RTL 0x00020000
+#define VKI_DL_HASHSTRING 0x00020000
+#define VKI_DL_INFO_OK 0x00010000
+#define VKI_DL_LOAD_DLINFO 0x00010000
+#define VKI_DL_UNLOADED 0x00020000
+
+
+#endif // __VKI_PPC64_AIX5_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
|