Advice on the prefered way to brand ELF binaries as needed on FreeBSD

Geoff Keating geoffk@cygnus.com
Wed Apr 12 12:53:00 GMT 2000


> Date: Tue, 11 Apr 2000 21:31:01 -0700
> From: "David O'Brien" <obrien@FreeBSD.org>
> Cc: binutils@sourceware.cygnus.com
> Reply-To: obrien@FreeBSD.org

> On Wed, Apr 12, 2000 at 12:25:15AM -0400, Michael Meissner wrote:
> > Neither one is acceptable IMHO.  This is because both of them rely on
> > __FreeBSD__ being defined,
> 
> Is there an easy to use symbol that tells what the target arch is?  I
> could #ifdef on that instead.

There is no "the" target arch.  BFD can support many targets
simultaneously.  Instead, you would need to create a new
elf32i386freebsd.c file (with a name which is unique in 8.3), have a
special 'elf32-i386freebsd' object file format, and so on.

I recommend against this.  There are easier ways to implement what you
want.  Uli has already mentioned the .note section, for instance.

-- 
- Geoffrey Keating <geoffk@cygnus.com>


More information about the Binutils mailing list