Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 May 1996 15:50:29 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        terry@lambert.org
Cc:        chuckr@Glue.umd.edu, freebsd-current@freebsd.org, joerg_wunsch@uriah.heep.sax.de
Subject:   Re: execve
Message-ID:  <199605020550.PAA30427@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>The big magic is that we don't have to have another object file
>that does:

>#ifdef AOUT
>static const struct execsw aout_execsw = { exec_aout_imgact, "a.out" };
>#endif
>#ifdef ELF
>static const struct execsw elf_execsw = { exec_elf_imgact, "ELF" };
>#endif
>const struct linker_set execsw_set = {
>#ifdef AOUT
>#ifdef ELF
>	2,
>#else
>	1,
>#endif
>#else
>#ifdef ELF
>	1,
>#else
>	0,
>#endif
>#endif
>	{
>#ifdef AOUT
>		{ (caddr_t)&aout_execsw },
>#endif
>#ifdef ELF
>		{ (caddr_t)&elf_execsw },
>#endif
>		NULL
>	}
>};

>To make ELF and AOUT optional (plus #ifdef IBCS2, #ifdef SHELL,
>#ifdef GZIP ...).

OTOH, it would be easy to change config to emit:

static const struct execsw aout_execsw = { exec_aout_imgact, "a.out" };
static const struct execsw elf_execsw = { exec_elf_imgact, "ELF" };
const struct linker_set execsw_set = {
	2,
	{
		{ (caddr_t)&aout_execsw },
		{ (caddr_t)&elf_execsw },
		NULL
	}
};

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605020550.PAA30427>