tech-kern archive

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

Re: ELFOSABI_NETBSD



On 07.04.2017 23:10, Christos Zoulas wrote:
> On Apr 7,  7:17pm, n54%gmx.com@localhost (Kamil Rytarowski) wrote:
> -- Subject: ELFOSABI_NETBSD
> 
> | Currently we set e_ident[EI_OSABI] to ELFOSABI_SYSV. This makes parsing
> | NetBSD core(5) core files cross-system little bit less obvious. In LLDB
> | we are recognized as generic or unknown unix.
> | 
> | Function ELFNAMEEND(coredump):
> | 
> |     161 	/* XXX Should be the OSABI/ABI version of the executable. */
> |     162 	ehdr.e_ident[EI_OSABI] =3D ELFOSABI_SYSV;
> 
> It matches the OSAbi of the binaries:
> 
> $ file /bin/sleep
> /bin/sleep: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /libexec/ld.elf_so, for NetBSD 7.99.59, not stripped
> 
> You need to look at the notes...
> 
> $ file sleep.core 
> sleep.core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), NetBSD-style, from 'sleep', pid=17264, uid=10080, gid=10080, nlwps=1, lwp=0 (signal 3/code 32767)
> 
> You always need to look at the notes :-)
> 
> christos
> 

NetBSD isn't the only system to set ELFOSABI_SYSV (value 0), so it's the
way to go (nothing to be changed).

Thanks for the confirmation!

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index