summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2008-11-22 12:36:15 +0000
committerkib <kib@FreeBSD.org>2008-11-22 12:36:15 +0000
commit8fad2283b3211a15c495b42689a5b65d91b96f3b (patch)
treec5e6cdb7219d5ec854c9a25a01e8ddfce232c5e9 /sys/i386
parent45f7975419230cdc3b0ba2cffb4b5fdebf5607bd (diff)
downloadFreeBSD-src-8fad2283b3211a15c495b42689a5b65d91b96f3b.zip
FreeBSD-src-8fad2283b3211a15c495b42689a5b65d91b96f3b.tar.gz
Add sv_flags field to struct sysentvec with intention to provide description
of the ABI of the currently executing image. Change some places to test the flags instead of explicit comparing with address of known sysentvec structures to determine ABI features. Discussed with: dchagin, imp, jhb, peter
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/elf_machdep.c3
-rw-r--r--sys/i386/ibcs2/ibcs2_sysvec.c3
-rw-r--r--sys/i386/linux/linux_sysvec.c6
3 files changed, 8 insertions, 4 deletions
diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c
index 93f1d45..19eddd0 100644
--- a/sys/i386/i386/elf_machdep.c
+++ b/sys/i386/i386/elf_machdep.c
@@ -72,7 +72,8 @@ struct sysentvec elf32_freebsd_sysvec = {
.sv_copyout_strings = exec_copyout_strings,
.sv_setregs = exec_setregs,
.sv_fixlimit = NULL,
- .sv_maxssiz = NULL
+ .sv_maxssiz = NULL,
+ .sv_flags = SV_ABI_FREEBSD | SV_IA32 | SV_ILP32
};
static Elf32_Brandinfo freebsd_brand_info = {
diff --git a/sys/i386/ibcs2/ibcs2_sysvec.c b/sys/i386/ibcs2/ibcs2_sysvec.c
index 2c834dd..9112ed7 100644
--- a/sys/i386/ibcs2/ibcs2_sysvec.c
+++ b/sys/i386/ibcs2/ibcs2_sysvec.c
@@ -85,7 +85,8 @@ struct sysentvec ibcs2_svr3_sysvec = {
.sv_copyout_strings = exec_copyout_strings,
.sv_setregs = exec_setregs,
.sv_fixlimit = NULL,
- .sv_maxssiz = NULL
+ .sv_maxssiz = NULL,
+ .sv_flags = SV_ABI_UNDEF | SV_IA32 | SV_ILP32
};
static int
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index a3acfc9..7444901 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -837,7 +837,8 @@ struct sysentvec linux_sysvec = {
.sv_copyout_strings = exec_copyout_strings,
.sv_setregs = exec_linux_setregs,
.sv_fixlimit = NULL,
- .sv_maxssiz = NULL
+ .sv_maxssiz = NULL,
+ .sv_flags = SV_ABI_LINUX | SV_AOUT | SV_IA32 | SV_ILP32
};
struct sysentvec elf_linux_sysvec = {
@@ -867,7 +868,8 @@ struct sysentvec elf_linux_sysvec = {
.sv_copyout_strings = exec_copyout_strings,
.sv_setregs = exec_linux_setregs,
.sv_fixlimit = NULL,
- .sv_maxssiz = NULL
+ .sv_maxssiz = NULL,
+ .sv_flags = SV_ABI_LINUX | SV_IA32 | SV_ILP32
};
static Elf32_Brandinfo linux_brand = {
OpenPOWER on IntegriCloud