Set clear comment about EI_OSABI and EI_ABIVERSION

/*
 * NetBSD sets generic SYSV OSABI and ABI version 0
 * Native ELF files are distinguishable with NetBSD specific notes
 */

No functional change.
This commit is contained in:
kamil 2017-05-04 11:12:23 +00:00
parent ec80600208
commit 1627fdf3a4

View File

@ -1,4 +1,4 @@
/* $NetBSD: core_elf32.c,v 1.54 2017/03/30 20:17:11 christos Exp $ */
/* $NetBSD: core_elf32.c,v 1.55 2017/05/04 11:12:23 kamil Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.54 2017/03/30 20:17:11 christos Exp $");
__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.55 2017/05/04 11:12:23 kamil Exp $");
#ifdef _KERNEL_OPT
#include "opt_coredump.h"
@ -158,7 +158,10 @@ ELFNAMEEND(coredump)(struct lwp *l, struct coredump_iostate *cookie)
#endif
ehdr.e_ident[EI_DATA] = ELFDEFNNAME(MACHDEP_ENDIANNESS);
ehdr.e_ident[EI_VERSION] = EV_CURRENT;
/* XXX Should be the OSABI/ABI version of the executable. */
/*
* NetBSD sets generic SYSV OSABI and ABI version 0
* Native ELF files are distinguishable with NetBSD specific notes
*/
ehdr.e_ident[EI_OSABI] = ELFOSABI_SYSV;
ehdr.e_ident[EI_ABIVERSION] = 0;