Re: thoughts on architectures
On Mon, Feb 11, 2002 at 04:41:07AM +0100, Marcus Brinkmann wrote:
> On Mon, Feb 11, 2002 at 02:35:50PM +1100, matthew green wrote:
> >
> > > Also, FreeBSD (and possibly NetBSD as well) uses the ELF OSABI field to mark
> > > it's binaries.
> >
> > The GNU/Hurd does it as well.
> >
> >
> > hmm, last i looked hurd used an ELF note, like NetBSD.
>
> Yes, sorry, I thought that was he meant (and he did :). I did not even know
> about a special OSABI field.
>
> ulysses:/tmp/x# objdump -s -j .note.ABI-tag /bin/bash
>
> /bin/bash: file format elf32-i386
>
> Contents of section .note.ABI-tag:
> 8048108 04000000 10000000 01000000 474e5500 ............GNU.
> 8048118 00000000 02000000 00000000 1e000000 ................
> ulysses:/tmp/x# objdump -s -j .note.ABI-tag /gnu/bin/bash
>
> /gnu/bin/bash: file format elf32-i386
>
> Contents of section .note.ABI-tag:
> 8048100 04000000 10000000 01000000 474e5500 ............GNU.
> 8048110 01000000 00000000 00000000 00000000 ................
There's a field in the ELF header called OS/ABI. Readelf -h finds it, and it
looks like this:
Normal binaries:
OS/ABI: UNIX - System V
FreeBSD binaries:
OS/ABI: UNIX - FreeBSD
I need to look into it a bit more, and figure out exactly what FreeBSD does
and doesn't do with this.
Reply to: