tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fixing the ELF priorities

On Tue, Jul 1, 2014 at 9:03 AM, Maxime Villard <> 
> Hi,
> I would like to improve the priorities of the binary loader. When the kernel
> loads a binary, it basically loops and calls different loaders (for aout, ELF,
> ...). There are several ELF loaders, for native and emulated binaries. This
> loop has a particular order: the 32bit compat loaders are called *before*
> the native ones. Which means that when you launch a simple 64bit binary on a
> 64bit system, the kernel first tries to load it through the netbsd32 and 
> linux32
> compat loaders. The priority is obviously wrong, the native loaders should be
> called first; it also has a non-negligible performance impact when executing
> many binaries (when compiling something, for example).

FreeBSD recently ( ) added
elf header signature parsing to decide how to execute binaries (based
on the Linux binfmt_misc). The main use case is for qemu emulation,
but it could also apply to this type of issue. It is obviously a
bigger change, but could be worth considering.


Home | Main Index | Thread Index | Old Index