# FreeBSD can't run a SVR4 elf executable ?



## zero (Mar 20, 2010)

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 (Mar 20, 2010)

*[Solved] FreeBSD can't run a SVR4 elf executable ?*

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 (Mar 20, 2010)

But ~99,996591% of FreeBSD users don't need that option.


----------



## MG (Mar 20, 2010)

Why not just kldload svr4? It's compiled with the GENERIC kernel.


----------

