From owner-cvs-src-old@FreeBSD.ORG Sun Mar 1 22:48:33 2009 Return-Path: <owner-cvs-src-old@FreeBSD.ORG> Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D79231065673 for <cvs-src-old@freebsd.org>; Sun, 1 Mar 2009 22:48:33 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C49838FC16 for <cvs-src-old@freebsd.org>; Sun, 1 Mar 2009 22:48:33 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n21MmXpo004438 for <cvs-src-old@freebsd.org>; Sun, 1 Mar 2009 22:48:33 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n21MmXlc004437 for cvs-src-old@freebsd.org; Sun, 1 Mar 2009 22:48:33 GMT (envelope-from rwatson@repoman.freebsd.org) Message-Id: <200903012248.n21MmXlc004437@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rwatson@repoman.freebsd.org using -f From: Robert Watson <rwatson@FreeBSD.org> Date: Sun, 1 Mar 2009 22:48:18 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 Subject: cvs commit: src/sys/kern imgact_elf.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree <cvs-src-old.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src-old>, <mailto:cvs-src-old-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/cvs-src-old> List-Post: <mailto:cvs-src-old@freebsd.org> List-Help: <mailto:cvs-src-old-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src-old>, <mailto:cvs-src-old-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 01 Mar 2009 22:48:34 -0000 rwatson 2009-03-01 22:48:18 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/kern imgact_elf.c Log: SVN rev 189255 on 2009-03-01 22:48:18Z by rwatson Merge r187686 from head to stable/7: When a statically linked binary is executed (or at least, one without an interpreter definition in its program header), set the auxiliary ELF argument AT_BASE to 0 rather than to the address that we would have mapped the interpreter at if there had been one. The ELF ABI specifications appear to be ambiguous as to the desired behavior in this situation, as they define AT_BASE as the base address of the interpreter, but do not mention what to do if there is none. On Solaris, AT_BASE will be set to the base address of the static binary if there is no interpreter, and on Linux, AT_BASE is set to 0. We go with the Linux semantics as they are of more immediate utility and allow the early runtime environment to know that the kernel has not mapped an interpreter, but because AT_PHDR points at the ELF header for the running binary, it is still possible to retrieve all required mapping information when the process starts should it be required. Either approach would be preferable to our current behavior of passing a pointer to an unmapped region of user memory as AT_BASE. Sponsored by: Google Revision Changes Path 1.178.2.5 +2 -1 src/sys/kern/imgact_elf.c