mirror of
https://github.com/opnsense/src.git
synced 2026-04-27 17:17:19 -04:00
linux(4): Microoptimize linux_elf.h for future use.
In order to reduce code duplication move coredump support definitions into the appropriate header and hide private definitions. MFC after: 1 week
This commit is contained in:
parent
6c85042afc
commit
7446514533
6 changed files with 37 additions and 32 deletions
|
|
@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <x86/linux/linux_x86.h>
|
||||
#include <amd64/linux/linux.h>
|
||||
#include <amd64/linux/linux_proto.h>
|
||||
#include <compat/linux/linux_elf.h>
|
||||
#include <compat/linux/linux_emul.h>
|
||||
#include <compat/linux/linux_fork.h>
|
||||
#include <compat/linux/linux_ioctl.h>
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <x86/linux/linux_x86.h>
|
||||
#include <amd64/linux32/linux.h>
|
||||
#include <amd64/linux32/linux32_proto.h>
|
||||
#include <compat/linux/linux_elf.h>
|
||||
#include <compat/linux/linux_emul.h>
|
||||
#include <compat/linux/linux_fork.h>
|
||||
#include <compat/linux/linux_ioctl.h>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#define __ELF_WORD_SIZE 64
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
|
@ -59,6 +61,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <arm64/linux/linux.h>
|
||||
#include <arm64/linux/linux_proto.h>
|
||||
#include <compat/linux/linux_dtrace.h>
|
||||
#include <compat/linux/linux_elf.h>
|
||||
#include <compat/linux/linux_emul.h>
|
||||
#include <compat/linux/linux_fork.h>
|
||||
#include <compat/linux/linux_ioctl.h>
|
||||
|
|
|
|||
|
|
@ -61,11 +61,31 @@ __FBSDID("$FreeBSD$");
|
|||
#include <machine/../linux/linux.h>
|
||||
#endif
|
||||
#include <compat/linux/linux_elf.h>
|
||||
#include <compat/linux/linux_emul.h>
|
||||
#include <compat/linux/linux_misc.h>
|
||||
|
||||
/* This adds "linux32_" and "linux64_" prefixes. */
|
||||
#define __linuxN(x) __CONCAT(__CONCAT(__CONCAT(linux,__ELF_WORD_SIZE),_),x)
|
||||
struct l_elf_siginfo {
|
||||
l_int si_signo;
|
||||
l_int si_code;
|
||||
l_int si_errno;
|
||||
};
|
||||
|
||||
typedef struct linux_pt_regset l_elf_gregset_t;
|
||||
|
||||
struct linux_elf_prstatus {
|
||||
struct l_elf_siginfo pr_info;
|
||||
l_short pr_cursig;
|
||||
l_ulong pr_sigpend;
|
||||
l_ulong pr_sighold;
|
||||
l_pid_t pr_pid;
|
||||
l_pid_t pr_ppid;
|
||||
l_pid_t pr_pgrp;
|
||||
l_pid_t pr_sid;
|
||||
l_timeval pr_utime;
|
||||
l_timeval pr_stime;
|
||||
l_timeval pr_cutime;
|
||||
l_timeval pr_cstime;
|
||||
l_elf_gregset_t pr_reg;
|
||||
l_int pr_fpvalid;
|
||||
};
|
||||
|
||||
#define LINUX_NT_AUXV 6
|
||||
|
||||
|
|
|
|||
|
|
@ -28,29 +28,15 @@
|
|||
#ifndef _COMPAT_LINUX_ELF_H_
|
||||
#define _COMPAT_LINUX_ELF_H_
|
||||
|
||||
struct l_elf_siginfo {
|
||||
l_int si_signo;
|
||||
l_int si_code;
|
||||
l_int si_errno;
|
||||
};
|
||||
struct note_info_list;
|
||||
|
||||
typedef struct linux_pt_regset l_elf_gregset_t;
|
||||
/* Linux core notes are labeled "CORE" */
|
||||
#define LINUX_ABI_VENDOR "CORE"
|
||||
|
||||
struct linux_elf_prstatus {
|
||||
struct l_elf_siginfo pr_info;
|
||||
l_short pr_cursig;
|
||||
l_ulong pr_sigpend;
|
||||
l_ulong pr_sighold;
|
||||
l_pid_t pr_pid;
|
||||
l_pid_t pr_ppid;
|
||||
l_pid_t pr_pgrp;
|
||||
l_pid_t pr_sid;
|
||||
l_timeval pr_utime;
|
||||
l_timeval pr_stime;
|
||||
l_timeval pr_cutime;
|
||||
l_timeval pr_cstime;
|
||||
l_elf_gregset_t pr_reg;
|
||||
l_int pr_fpvalid;
|
||||
};
|
||||
/* This adds "linux32_" and "linux64_" prefixes. */
|
||||
#define __linuxN(x) __CONCAT(__CONCAT(__CONCAT(linux,__ELF_WORD_SIZE),_),x)
|
||||
|
||||
void __linuxN(prepare_notes)(struct thread *, struct note_info_list *,
|
||||
size_t *);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,10 +33,6 @@
|
|||
#define _LINUX_EMUL_H_
|
||||
|
||||
struct image_params;
|
||||
struct note_info_list;
|
||||
|
||||
/* Linux core notes are labeled "CORE" */
|
||||
#define LINUX_ABI_VENDOR "CORE"
|
||||
|
||||
/*
|
||||
* modeled after similar structure in NetBSD
|
||||
|
|
@ -61,8 +57,6 @@ void linux_schedtail(struct thread *);
|
|||
void linux_on_exec(struct proc *, struct image_params *);
|
||||
void linux_thread_dtor(struct thread *);
|
||||
int linux_common_execve(struct thread *, struct image_args *);
|
||||
void linux32_prepare_notes(struct thread *, struct note_info_list *, size_t *);
|
||||
void linux64_prepare_notes(struct thread *, struct note_info_list *, size_t *);
|
||||
|
||||
/* process emuldata flags */
|
||||
#define LINUX_XDEPR_REQUEUEOP 0x00000001 /* uses deprecated
|
||||
|
|
|
|||
Loading…
Reference in a new issue