PDA

View Full Version : [Solved] FreeBSD can't run a SVR4 elf executable ?


zero
March 20th, 2010, 15:43
Hi,

I'm just asking why freebsd can't run a SVR4 elf executable ?
I tried to write "my own" header (with some tricks in assembler),
but when I exec my application, it return an error:

ELF binary type "0" not known.

So I must run brandelf before execute it.
Is'nt weird ? Normally, the type 0 is the System V ABI, It's a common
standard file format ? no ?

zero
March 20th, 2010, 17:59
Hmm ok, the System V 4 ABI support is'nt compiled by default, we need to add:

options COMPAT_SVR4

in the kernel configuration file.
It should be better to add this option by default as well we can easily code a portable executable.

DutchDaemon
March 20th, 2010, 19:00
But ~99,996591% of FreeBSD users don't need that option.

MG
March 20th, 2010, 19:31
Why not just kldload svr4? It's compiled with the GENERIC kernel.