Make sure that the primary native brandinfo always gets added

first and the native ia32 compat as middle (before other things).
o(ld)brandinfo as well as third party like linux, kfreebsd, etc.
stays on SI_ORDER_ANY coming last.

The reason for this is only to make sure that even in case we would
overflow the MAX_BRANDS sized array, the native FreeBSD brandinfo
would still be there and the system would be operational.

Reviewed by:	kib
MFC after:	1 month
This commit is contained in:
Bjoern A. Zeeb 2009-10-03 11:57:21 +00:00
parent 4011f96514
commit 52bf2041ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197729
9 changed files with 9 additions and 9 deletions

View File

@ -89,7 +89,7 @@ static Elf64_Brandinfo freebsd_brand_info = {
.flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
};
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST,
(sysinit_cfunc_t) elf64_insert_brand_entry,
&freebsd_brand_info);

View File

@ -88,7 +88,7 @@ static Elf32_Brandinfo freebsd_brand_info = {
.flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
};
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
(sysinit_cfunc_t) elf32_insert_brand_entry,
&freebsd_brand_info);

View File

@ -152,7 +152,7 @@ static Elf32_Brandinfo ia32_brand_info = {
.flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
};
SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY,
SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_MIDDLE,
(sysinit_cfunc_t) elf32_insert_brand_entry,
&ia32_brand_info);

View File

@ -88,7 +88,7 @@ static Elf32_Brandinfo freebsd_brand_info = {
.flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
};
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
(sysinit_cfunc_t) elf32_insert_brand_entry,
&freebsd_brand_info);

View File

@ -95,7 +95,7 @@ static Elf64_Brandinfo freebsd_brand_info = {
.brand_note = &elf64_freebsd_brandnote,
.flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
};
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST,
(sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_info);
static Elf64_Brandinfo freebsd_brand_oinfo = {

View File

@ -108,7 +108,7 @@ static Elf64_Brandinfo freebsd_brand_info64 = {
.flags = BI_BRAND_NOTE
};
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST,
(sysinit_cfunc_t) elf64_insert_brand_entry,
&freebsd_brand_info64);

View File

@ -90,7 +90,7 @@ static Elf32_Brandinfo freebsd_brand_info = {
.flags = BI_BRAND_NOTE
};
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
(sysinit_cfunc_t) elf32_insert_brand_entry,
&freebsd_brand_info);

View File

@ -91,7 +91,7 @@ static Elf32_Brandinfo freebsd_brand_info = {
.flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
};
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
(sysinit_cfunc_t) elf32_insert_brand_entry,
&freebsd_brand_info);

View File

@ -103,7 +103,7 @@ static Elf64_Brandinfo freebsd_brand_info = {
.flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
};
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST,
(sysinit_cfunc_t) elf64_insert_brand_entry,
&freebsd_brand_info);