Subject: Re: Emulation question
To: Frode Vatvedt Fjeld <email@example.com>
From: Jason R Thorpe <firstname.lastname@example.org>
Date: 07/13/2000 07:57:38
On Thu, Jul 13, 2000 at 02:59:44PM +0200, Frode Vatvedt Fjeld wrote:
> Is this information somehow encoded in the file, or is it based on the
> process' behavior, like detecting a linux-type syscall or some such.
Well, ELF can have an arbitrary number of sections, and so NetBSD places
special note sections in its executables that identify them as NetBSD.
For Linux and SVR4, a hueristic is used. Take a look at
* exec_elf_makecmds(): Prepare an Elf binary's exec package
Note that it calls several probe functions to determine which operating
system it is for .. and defaults to NetBSD `emulation'.
-- Jason R. Thorpe <email@example.com>