RFC: Changing ELFOSABI_FREEBSD into ELFOSABI_SYSV/ELFOSABI_NONE
Robert Millan
rmh at aybabtu.com
Wed Jan 4 09:41:58 UTC 2006
And have you seen ./i386/i386/elf_machdep.c ? Looks like ELFOSABI_FREEBSD
is somehow associated with an ld.so path:
static Elf32_Brandinfo freebsd_brand_info = {
ELFOSABI_FREEBSD,
EM_386,
"FreeBSD",
NULL,
"/libexec/ld-elf.so.1",
&elf32_freebsd_sysvec,
NULL,
};
I think the idea is that systems using _SYSV use the loader path to distinguish
the binary type. This might explain why kFreeBSD is unable to identify GNU/Linux
binaries in a chroot unless they are set as _LINUX:
static Elf32_Brandinfo linux_glibc2brand = {
ELFOSABI_LINUX,
EM_386,
"Linux",
"/compat/linux",
"/lib/ld-linux.so.2",
^^^^^^^^^^^^^^^^^^^^^
[ I don't remember this one being present before. Maybe it works now? ]
&elf_linux_sysvec,
NULL,
};
--
Robert Millan
More information about the Glibc-bsd-devel
mailing list