This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: support for FreeBSD and GNU/FreeBSD

Bruno Haible <> writes:

> H. J. Lu writes:
> > For all I know, the only reason FreeBSD wants a special target is to
> > run some very OLD static Linux binaries, which don't have the
> > .note.ABI-tag section.
> Nope, I'm not talking about Linux binaries. The patch is about native
> FreeBSD binaries. If you create an executable using the unpatched
> binutils using the original elf_i386 emulation, then it will simply
> *not run* on an unpatched FreeBSD kernel; this affects static binaries
> and the ELF interpreter itself.

Take a look at the kern.fallback_elf_brand sysctl.  It allows you to
set a default brand.

That said, I really think we should simply forget about the old
FreeBSD 3.x style branding.  It definitely breaks the ELF
specification, GNU/FreeBSD is not targeted at FreeBSD 3.x kernels, and
as David indicated, it's not very likely that people living in a
FreeBSD 3.x world will install the latest binutils on their systems.
And if they do, they can always brand their binaries themselves using

I also have my doubts if we really need to adopt the EI_OSABI
branding.  Right now it's only needed for static binaries.  Their
number is limited, and one could argue that branding them by hand (or
automatically when building world) is acceptable.

I would really regret it if on FreeBSD ld would no longer be a generic
ELF linker.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]