+2012-10-30 Yao Qi <yao@codesourcery.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure.in: Set CORE_HEADER to hosts/x86-64linux.h for
+ 'i[3-7]86-*-linux-*' if x86_64-*linux is enabled.
+ * configure: Regenerated.
+
+ * elf64-x86-64.c (elf_x86_64_write_core_note): Replace type
+ 'prpsinfo_t' and 'prstatus_t' with 'prpsinfo64_t' and
+ 'prstatus64_t' respectively.
+
+ * hosts/x86-64linux.h (a8_uint64_t): New.
+ (user_regsx32_struct): Renamed to ...
+ (user_regs64_struct): This. Replace uint64_t with a8_uint64_t.
+ (elf_gregx32_t): Renamed to ...
+ (elf_greg64_t): This. Replace uint64_t with a8_uint64_t.
+ (ELF_NGREGX32): Removed.
+ (ELF_NGREG64): New.
+ (elf_gregx32_t): Removed.
+ (elf_greg64_t): New.
+ (struct prstatus64_timeval): New.
+ (elf_prstatusx32): Replace elf_gregsetx32_t with elf_gregset64_t.
+ (elf_prstatus64): New.
+ (elf_prpsinfo64): New.
+ (prstatus64_t, prpsinfo64_t): New typedef.
+
2012-10-29 Sean Keys <skeys@ipdatasys.com>
* elf32-xgate.c(elf_xgate_howto_table): Fix src and dest mask for
-/* Copyright (C) 2006, 2011
+/* Copyright (C) 2006, 2011, 2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
typedef unsigned long long int uint64_t;
#endif
+/* Unsigned 64-bit integer aligned to 8 bytes. */
+typedef uint64_t __attribute__ ((__aligned__ (8))) a8_uint64_t;
+
#undef HAVE_PRPSINFO32_T
#define HAVE_PRPSINFO32_T
#undef HAVE_PRPSINFO32_T_PR_PID
int32_t xss;
};
-struct user_regsx32_struct
+struct user_regs64_struct
{
- uint64_t r15;
- uint64_t r14;
- uint64_t r13;
- uint64_t r12;
- uint64_t rbp;
- uint64_t rbx;
- uint64_t r11;
- uint64_t r10;
- uint64_t r9;
- uint64_t r8;
- uint64_t rax;
- uint64_t rcx;
- uint64_t rdx;
- uint64_t rsi;
- uint64_t rdi;
- uint64_t orig_rax;
- uint64_t rip;
- uint64_t cs;
- uint64_t eflags;
- uint64_t rsp;
- uint64_t ss;
- uint64_t fs_base;
- uint64_t gs_base;
- uint64_t ds;
- uint64_t es;
- uint64_t fs;
- uint64_t gs;
+ a8_uint64_t r15;
+ a8_uint64_t r14;
+ a8_uint64_t r13;
+ a8_uint64_t r12;
+ a8_uint64_t rbp;
+ a8_uint64_t rbx;
+ a8_uint64_t r11;
+ a8_uint64_t r10;
+ a8_uint64_t r9;
+ a8_uint64_t r8;
+ a8_uint64_t rax;
+ a8_uint64_t rcx;
+ a8_uint64_t rdx;
+ a8_uint64_t rsi;
+ a8_uint64_t rdi;
+ a8_uint64_t orig_rax;
+ a8_uint64_t rip;
+ a8_uint64_t cs;
+ a8_uint64_t eflags;
+ a8_uint64_t rsp;
+ a8_uint64_t ss;
+ a8_uint64_t fs_base;
+ a8_uint64_t gs_base;
+ a8_uint64_t ds;
+ a8_uint64_t es;
+ a8_uint64_t fs;
+ a8_uint64_t gs;
};
/* Type for a general-purpose register. */
typedef uint32_t elf_greg32_t;
-typedef uint64_t elf_gregx32_t;
+typedef a8_uint64_t elf_greg64_t;
/* And the whole bunch of them. We could have used `struct
user_regs_struct' directly in the typedef, but tradition says that
semantics, so leave it that way. */
#define ELF_NGREG32 (sizeof (struct user_regs32_struct) / sizeof(elf_greg32_t))
typedef elf_greg32_t elf_gregset32_t[ELF_NGREG32];
-#define ELF_NGREGX32 (sizeof (struct user_regsx32_struct) / sizeof(elf_gregx32_t))
-typedef elf_gregx32_t elf_gregsetx32_t[ELF_NGREGX32];
+#define ELF_NGREG64 (sizeof (struct user_regs64_struct) / sizeof(elf_greg64_t))
+typedef elf_greg64_t elf_gregset64_t[ELF_NGREG64];
/* Definitions to generate Intel SVR4-like core files. These mostly
have the same names as the SVR4 types with "elf_" tacked on the
int tv_usec;
};
+struct prstatus64_timeval
+ {
+ a8_uint64_t tv_sec;
+ a8_uint64_t tv_usec;
+ };
+
struct elf_prstatus32
{
struct elf_siginfo pr_info; /* Info associated with signal. */
struct prstatus32_timeval pr_stime; /* System time. */
struct prstatus32_timeval pr_cutime; /* Cumulative user time. */
struct prstatus32_timeval pr_cstime; /* Cumulative system time. */
- elf_gregsetx32_t pr_reg; /* GP registers. */
+ elf_gregset64_t pr_reg; /* GP registers. */
+ int pr_fpvalid; /* True if math copro being used. */
+ };
+
+struct elf_prstatus64
+ {
+ struct elf_siginfo pr_info; /* Info associated with signal. */
+ short int pr_cursig; /* Current signal. */
+ a8_uint64_t pr_sigpend; /* Set of pending signals. */
+ a8_uint64_t pr_sighold; /* Set of held signals. */
+ pid_t pr_pid;
+ pid_t pr_ppid;
+ pid_t pr_pgrp;
+ pid_t pr_sid;
+ struct prstatus64_timeval pr_utime; /* User time. */
+ struct prstatus64_timeval pr_stime; /* System time. */
+ struct prstatus64_timeval pr_cutime; /* Cumulative user time. */
+ struct prstatus64_timeval pr_cstime; /* Cumulative system time. */
+ elf_gregset64_t pr_reg; /* GP registers. */
int pr_fpvalid; /* True if math copro being used. */
};
char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
};
+struct elf_prpsinfo64
+ {
+ char pr_state; /* Numeric process state. */
+ char pr_sname; /* Char for pr_state. */
+ char pr_zomb; /* Zombie. */
+ char pr_nice; /* Nice val. */
+ a8_uint64_t pr_flag; /* Flags. */
+ unsigned int pr_uid;
+ unsigned int pr_gid;
+ int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+ /* Lots missing */
+ char pr_fname[16]; /* Filename of executable. */
+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
+ };
/* The rest of this file provides the types for emulation of the
Solaris <proc_service.h> interfaces that should be implemented by
/* Process status and info. In the end we do provide typedefs for them. */
typedef struct elf_prstatus32 prstatus32_t;
typedef struct elf_prstatusx32 prstatusx32_t;
+typedef struct elf_prstatus64 prstatus64_t;
typedef struct elf_prpsinfo32 prpsinfo32_t;
+typedef struct elf_prpsinfo64 prpsinfo64_t;