From 01bf63c9fb60c7104bfbbcfd5be8c1deab29ea6a Mon Sep 17 00:00:00 2001 From: dchagin Date: Sun, 5 Apr 2009 09:27:19 +0000 Subject: Fix KBI breakage by r190520 which affects older linux.ko binaries: 1) Move the new field (brand_note) to the end of the Brandinfo structure. 2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer is valid. 3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old modules won't have the flag set, so the new field brand_note would be ignored. Suggested by: jhb Reviewed by: jhb Approved by: kib (mentor) MFC after: 6 days --- sys/compat/ia32/ia32_sysvec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/compat/ia32') diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c index 2b7ecba..af8168e 100644 --- a/sys/compat/ia32/ia32_sysvec.c +++ b/sys/compat/ia32/ia32_sysvec.c @@ -149,7 +149,7 @@ static Elf32_Brandinfo ia32_brand_info = { .sysvec = &ia32_freebsd_sysvec, .interp_newpath = "/libexec/ld-elf32.so.1", .brand_note = &elf32_freebsd_brandnote, - .flags = BI_CAN_EXEC_DYN + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY, @@ -165,7 +165,7 @@ static Elf32_Brandinfo ia32_brand_oinfo = { .sysvec = &ia32_freebsd_sysvec, .interp_newpath = "/libexec/ld-elf32.so.1", .brand_note = &elf32_freebsd_brandnote, - .flags = BI_CAN_EXEC_DYN + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; SYSINIT(oia32, SI_SUB_EXEC, SI_ORDER_ANY, -- cgit v1.1