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:
parent
4011f96514
commit
52bf2041ac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197729
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 = {
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user