Thu Jan 2 05:18:07 2020 UTC ()
Sync the e_ident[EI_OSABI] magic values with the ELF specification

source: http://www.sco.com/developers/gabi/latest/ch4.eheader.html


(kamil)
diff -r1.163 -r1.164 src/sys/sys/exec_elf.h

cvs diff -r1.163 -r1.164 src/sys/sys/exec_elf.h (expand / switch to unified diff)

--- src/sys/sys/exec_elf.h 2020/01/02 04:58:07 1.163
+++ src/sys/sys/exec_elf.h 2020/01/02 05:18:07 1.164
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: exec_elf.h,v 1.163 2020/01/02 04:58:07 kamil Exp $ */ 1/* $NetBSD: exec_elf.h,v 1.164 2020/01/02 05:18:07 kamil Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1994 The NetBSD Foundation, Inc. 4 * Copyright (c) 1994 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Christos Zoulas. 8 * by Christos Zoulas.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -159,45 +159,51 @@ typedef struct { @@ -159,45 +159,51 @@ typedef struct {
159#define ELFDATANONE 0 /* Invalid data encoding */ 159#define ELFDATANONE 0 /* Invalid data encoding */
160#define ELFDATA2LSB 1 /* 2's complement values, LSB first */ 160#define ELFDATA2LSB 1 /* 2's complement values, LSB first */
161#define ELFDATA2MSB 2 /* 2's complement values, MSB first */ 161#define ELFDATA2MSB 2 /* 2's complement values, MSB first */
162 162
163/* e_ident[EI_VERSION] */ 163/* e_ident[EI_VERSION] */
164#define EV_NONE 0 /* Invalid version */ 164#define EV_NONE 0 /* Invalid version */
165#define EV_CURRENT 1 /* Current version */ 165#define EV_CURRENT 1 /* Current version */
166#define EV_NUM 2 166#define EV_NUM 2
167 167
168/* e_ident[EI_OSABI] */ 168/* e_ident[EI_OSABI] */
169#define ELFOSABI_SYSV 0 /* UNIX System V ABI */ 169#define ELFOSABI_SYSV 0 /* UNIX System V ABI */
170#define ELFOSABI_HPUX 1 /* HP-UX operating system */ 170#define ELFOSABI_HPUX 1 /* HP-UX operating system */
171#define ELFOSABI_NETBSD 2 /* NetBSD */ 171#define ELFOSABI_NETBSD 2 /* NetBSD */
172#define ELFOSABI_LINUX 3 /* GNU/Linux */ 172#define ELFOSABI_GNU 3 /* GNU/Linux */
173#define ELFOSABI_HURD 4 /* GNU/Hurd */ 173#define ELFOSABI_HURD 4 /* GNU/Hurd - historical */
174#define ELFOSABI_86OPEN 5 /* 86Open */ 174#define ELFOSABI_86OPEN 5 /* 86Open - historical */
175#define ELFOSABI_SOLARIS 6 /* Solaris */ 175#define ELFOSABI_SOLARIS 6 /* Solaris */
176#define ELFOSABI_MONTEREY 7 /* Monterey */ 176#define ELFOSABI_AIX 7 /* AIX */
177#define ELFOSABI_IRIX 8 /* IRIX */ 177#define ELFOSABI_IRIX 8 /* IRIX */
178#define ELFOSABI_FREEBSD 9 /* FreeBSD */ 178#define ELFOSABI_FREEBSD 9 /* FreeBSD */
179#define ELFOSABI_TRU64 10 /* TRU64 UNIX */ 179#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
180#define ELFOSABI_MODESTO 11 /* Novell Modesto */ 180#define ELFOSABI_MODESTO 11 /* Novell Modesto */
181#define ELFOSABI_OPENBSD 12 /* OpenBSD */ 181#define ELFOSABI_OPENBSD 12 /* OpenBSD */
182#define ELFOSABI_OPENVMS 13 /* OpenVMS */ 182#define ELFOSABI_OPENVMS 13 /* OpenVMS */
183#define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */ 183#define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */
184#define ELFOSABI_AROS 15 /* Amiga Research OS */ 184#define ELFOSABI_AROS 15 /* Amiga Research OS */
 185#define ELFOSABI_FENIXOS 16 /* The FenixOS highly scalable multi-core OS */
 186#define ELFOSABI_CLOUDABI 17 /* Nuxi CloudABI */
 187#define ELFOSABI_OPENVOS 18 /* Stratus Technologies OpenVOS */
185/* Unofficial OSABIs follow */ 188/* Unofficial OSABIs follow */
186#define ELFOSABI_ARM 97 /* ARM */ 189#define ELFOSABI_ARM 97 /* ARM */
187#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ 190#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
188 191
189#define ELFOSABI_NONE ELFOSABI_SYSV 192#define ELFOSABI_NONE ELFOSABI_SYSV
190#define ELFOSABI_AIX ELFOSABI_MONTEREY 193
 194/* Historical aliases. */
 195#define ELFOSABI_LINUX ELFOSABI_GNU
 196#define ELFOSABI_MONTEREY ELFOSABI_AIX
191 197
192/* e_type */ 198/* e_type */
193#define ET_NONE 0 /* No file type */ 199#define ET_NONE 0 /* No file type */
194#define ET_REL 1 /* Relocatable file */ 200#define ET_REL 1 /* Relocatable file */
195#define ET_EXEC 2 /* Executable file */ 201#define ET_EXEC 2 /* Executable file */
196#define ET_DYN 3 /* Shared object file */ 202#define ET_DYN 3 /* Shared object file */
197#define ET_CORE 4 /* Core file */ 203#define ET_CORE 4 /* Core file */
198#define ET_NUM 5 204#define ET_NUM 5
199 205
200#define ET_LOOS 0xfe00 /* Operating system specific range */ 206#define ET_LOOS 0xfe00 /* Operating system specific range */
201#define ET_HIOS 0xfeff 207#define ET_HIOS 0xfeff
202#define ET_LOPROC 0xff00 /* Processor-specific range */ 208#define ET_LOPROC 0xff00 /* Processor-specific range */
203#define ET_HIPROC 0xffff 209#define ET_HIPROC 0xffff