summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_elf.c
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2009-04-05 09:27:19 +0000
committerdchagin <dchagin@FreeBSD.org>2009-04-05 09:27:19 +0000
commit01bf63c9fb60c7104bfbbcfd5be8c1deab29ea6a (patch)
treed36c5668c15e84db66ecb8e052140097d1a8b901 /sys/kern/imgact_elf.c
parent2a2dfa7d229606cbb1ff3302fab0681c9d4877a1 (diff)
downloadFreeBSD-src-01bf63c9fb60c7104bfbbcfd5be8c1deab29ea6a.zip
FreeBSD-src-01bf63c9fb60c7104bfbbcfd5be8c1deab29ea6a.tar.gz
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
Diffstat (limited to 'sys/kern/imgact_elf.c')
-rw-r--r--sys/kern/imgact_elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 81a79a3..e2c0a12 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -189,7 +189,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp,
for (i = 0; i < MAX_BRANDS; i++) {
bi = elf_brand_list[i];
if (bi != NULL && hdr->e_machine == bi->machine &&
- bi->brand_note != NULL) {
+ (bi->flags & BI_BRAND_NOTE) != 0) {
ret = __elfN(check_note)(imgp, bi->brand_note, osrel);
if (ret)
return (bi);
OpenPOWER on IntegriCloud