From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 7 00:10:01 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D581616A421 for ; Fri, 7 Dec 2007 00:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B7EBF13C458 for ; Fri, 7 Dec 2007 00:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lB70A1Dl049171 for ; Fri, 7 Dec 2007 00:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lB70A1wr049170; Fri, 7 Dec 2007 00:10:01 GMT (envelope-from gnats) Resent-Date: Fri, 7 Dec 2007 00:10:01 GMT Resent-Message-Id: <200712070010.lB70A1wr049170@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Pedro F. Giffuni" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B62016A468 for ; Fri, 7 Dec 2007 00:01:14 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 1BCEB13C44B for ; Fri, 7 Dec 2007 00:01:14 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lB7018v2076303 for ; Fri, 7 Dec 2007 00:01:08 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id lB7018tn076302; Fri, 7 Dec 2007 00:01:08 GMT (envelope-from nobody) Message-Id: <200712070001.lB7018tn076302@www.freebsd.org> Date: Fri, 7 Dec 2007 00:01:08 GMT From: "Pedro F. Giffuni" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/118473: Linuxulator: ELF Notes vs. brandelf X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2007 00:10:02 -0000 >Number: 118473 >Category: kern >Synopsis: Linuxulator: ELF Notes vs. brandelf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 07 00:10:01 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Pedro F. Giffuni >Release: 6.3-RC1 >Organization: >Environment: FreeBSD kakumen.cable.net.co 6.3-RC1 FreeBSD 6.3-RC1 #6: Mon Dec 3 16:11:52 COT 2007 root@kakumen.cable.net.co:/usr/src/sys/amd64/compile/SMP amd64 >Description: Since 1999 FreeBSD has always used the standard ELF identification branding for it's binaries: http://docs.freebsd.org/cgi/mid.cgi?199902271905.LAA10250 However GNU/Linux chose to misinterpret the standard and is using vendor specific ELF notes instead: http://www.netbsd.org/docs/kernel/elf-notes.html As a result we have had to use brandelf(1) to tag the linux binaries in order to use them with the linux ABI. As a side note, OpenWatcom does generate properly branded linux binaries. >How-To-Repeat: Our linux emulation wiki mentions the following "bug" reported by running the Linux Test Project under the linuxulator: - report by LTP and/or the linux pkill command: "2.4+ kernel w/o ELF notes? -- report this" >Fix: Our loader should probably know about ELF notes and try to use them for the linuxulator when/if the standard EI_OSABI is not present; the linuxulator might also need some additional knowledge from ELF notes. While brandelf(1) is still a sound utility to have around, this way we wouldn't require it for GNU platforms. >Release-Note: >Audit-Trail: >Unformatted: