This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Advice on the prefered way to brand ELF binaries as needed on FreeBSD
- To: obrien at FreeBSD dot org
- Subject: Re: Advice on the prefered way to brand ELF binaries as needed on FreeBSD
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Wed, 12 Apr 2000 00:25:15 -0400
- Cc: binutils at sourceware dot cygnus dot com
- References: <20000411203503.B92440@dragon.nuxi.com>
On Tue, Apr 11, 2000 at 08:35:03PM -0700, David O'Brien wrote:
> FreeBSD brands all ELF files so the image loader knows what type of
> binary it is and use the proper compatibility layer if the binary is not
> a native FreeBSD one. Current we do it using the 1st patch below. I
> have taken a slightly more general approach with the second patch below.
> Is this patch OK, or is there another prefered way to do this?
Neither one is acceptable IMHO. This is because both of them rely on
__FreeBSD__ being defined, which prevents the proper FreeBSD executable from
being created if you make a cross compiler from a different system. Similarly
on FreeBSD systems, you cannot create a cross compiler to other ELF systems.
As H. J. says, we've had this discussion before. While using notes is one
alternative, using your current branding mechanism could also work if you make
cross compilers both from/to FreeBSD.
--
Michael Meissner, Cygnus Solutions, a Red Hat company.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482