Date: Wed, 18 Nov 2015 17:03:22 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291020 - head/sys/kern Message-ID: <201511181703.tAIH3MBu092089@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Wed Nov 18 17:03:22 2015 New Revision: 291020 URL: https://svnweb.freebsd.org/changeset/base/291020 Log: Extend r270123 to run the brand info's header_supported() routine for branded as well as unbranded binaries. This will be required to add support for the new ELFv2 ABI on powerpc64, which is distinguished from ELFv1 by the contents of the ELF header's flags field. Reviewed by: imp MFC after: 2 weeks Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Wed Nov 18 16:52:19 2015 (r291019) +++ head/sys/kern/imgact_elf.c Wed Nov 18 17:03:22 2015 (r291020) @@ -286,8 +286,11 @@ __elfN(get_brandinfo)(struct image_param if (hdr->e_machine == bi->machine && (hdr->e_ident[EI_OSABI] == bi->brand || strncmp((const char *)&hdr->e_ident[OLD_EI_BRAND], - bi->compat_3_brand, strlen(bi->compat_3_brand)) == 0)) - return (bi); + bi->compat_3_brand, strlen(bi->compat_3_brand)) == 0)) { + /* Looks good, but give brand a chance to veto */ + if (!bi->header_supported || bi->header_supported(imgp)) + return (bi); + } } /* No known brand, see if the header is recognized by any brand */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511181703.tAIH3MBu092089>