Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Dec 2007 00:01:08 GMT
From:      "Pedro F. Giffuni" <giffunip@tutopia.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/118473: Linuxulator: ELF Notes vs. brandelf
Message-ID:  <200712070001.lB7018tn076302@www.freebsd.org>
Resent-Message-ID: <200712070010.lB70A1wr049170@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712070001.lB7018tn076302>