From nobody@FreeBSD.org  Mon Dec 10 23:42:14 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 98A9816A46B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Dec 2007 23:42:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 8365113C459
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Dec 2007 23:42:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lBANgBCp047600
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Dec 2007 23:42:11 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lBANgBcC047599;
	Mon, 10 Dec 2007 23:42:11 GMT
	(envelope-from nobody)
Message-Id: <200712102342.lBANgBcC047599@www.freebsd.org>
Date: Mon, 10 Dec 2007 23:42:11 GMT
From: "Pedro F. Giffuni" <giffunip@tutopia.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: update sys/sys/elf_common.h with new emachine types
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         118540
>Category:       kern
>Synopsis:       [elf] [patch] update sys/sys/elf_common.h with new emachine types
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kaiw
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 10 23:50:00 UTC 2007
>Closed-Date:    Sun Jan 16 11:18:27 UTC 2011
>Last-Modified:  Sun Jan 16 11:18:27 UTC 2011
>Originator:     Pedro F. Giffuni
>Release:        6.3-RC1
>Organization:
>Environment:
FreeBSD kakumen.cable.net.co 6.3-RC1 FreeBSD 6.3-RC1 #6: Mon Dec  3 16:11:52 COT 2007     root@kakumen.cable.net.co:/usr/src/sys/amd64/compile/SMP  amd64

>Description:
Add some unimportant things from the latest ELF gABI:
    http://www.caldera.com/developers/gabi/

SHT_NUM was taken from DragonFly but it is on some other OS's too.

Perhaps we should kill the legacy EM_* types ?
>How-To-Repeat:

>Fix:
patch from current:
--- sys/sys/elf_common.h.orig	2007-12-10 16:53:28.000000000 -0500
+++ sys/sys/elf_common.h	2007-12-10 18:27:39.000000000 -0500
@@ -101,6 +101,7 @@
 #define ELFOSABI_OPENBSD	12	/* OpenBSD */
 #define ELFOSABI_OPENVMS	13	/* Open VMS */
 #define ELFOSABI_NSK		14	/* HP Non-Stop Kernel */
+#define ELFOSABI_AROS		15	/* Amiga Research OS */
 #define ELFOSABI_ARM		97	/* ARM */
 #define ELFOSABI_STANDALONE	255	/* Standalone (embedded) application */
 
@@ -147,6 +148,7 @@
 #define EM_RH32		38	/* TRW RH-32. */
 #define EM_RCE		39	/* Motorola RCE. */
 #define EM_ARM		40	/* ARM. */
+#define EM_ALPHA	41	/* Digital Alpha */
 #define EM_SH		42	/* Hitachi SH. */
 #define EM_SPARCV9	43	/* SPARC v9 64-bit. */
 #define EM_TRICORE	44	/* Siemens TriCore embedded processor. */
@@ -169,12 +171,60 @@
 #define EM_TINYJ	61	/* Advanced Logic Corp. TinyJ processor. */
 #define EM_X86_64	62	/* Advanced Micro Devices x86-64 */
 #define	EM_AMD64	EM_X86_64	/* Advanced Micro Devices x86-64 (compat) */
+#define EM_PDSP		63	/* Sony DSP Processor */
+#define EM_FX66		66	/* Siemens FX66 microcontroller */
+#define EM_ST9PLUS	67	/* STMicroelectronics ST9+ 8/16 mc */
+#define EM_ST7		68	/* STmicroelectronics ST7 8 bit mc */
+#define EM_68HC16	69	/* Motorola MC68HC16 microcontroller */
+#define EM_68HC11	70	/* Motorola MC68HC11 microcontroller */
+#define EM_68HC08	71	/* Motorola MC68HC08 microcontroller */
+#define EM_68HC05	72	/* Motorola MC68HC05 microcontroller */
+#define EM_SVX		73	/* Silicon Graphics SVx */
+#define EM_ST19		74	/* STMicroelectronics ST19 8 bit mc */
+#define EM_VAX		75	/* Digital VAX */
+#define EM_CRIS		76	/* Axis Comm. 32-bit embedded processor */
+#define EM_JAVELIN	77	/* Infineon Tech. 32-bit embedded processor */
+#define EM_FIREPATH	78	/* Element 14 64-bit DSP Processor */
+#define EM_ZSP		79	/* LSI Logic 16-bit DSP Processor */
+#define EM_MMIX		80	/* Donald Knuth's educational 64-bit proc */
+#define EM_HUANY	81	/* Harvard Uni. machine-independent obj files */
+#define EM_PRISM	82	/* SiTera Prism */
+#define EM_AVR		83	/* Atmel AVR 8-bit microcontroller */
+#define EM_FR30		84	/* Fujitsu FR30 */
+#define EM_D10V		85	/* Mitsubishi D10V */
+#define EM_D30V		86	/* Mitsubishi D30V */
+#define EM_V850		87	/* NEC v850 */
+#define EM_M32R		88	/* Mitsubishi M32R */
+#define EM_MN10300	89	/* Matsushita MN10300 */
+#define EM_MN10200	90	/* Matsushita MN10200 */
+#define EM_PJ		91	/* picoJava */
+#define EM_OPENRISC	92	/* OpenRISC 32-bit embedded processor */
+#define EM_ARC_A5	93	/* ARC Cores Tangent-A5 */
+#define EM_XTENSA	94	/* Tensilica Xtensa Architecture */
+#define EM_VIDEOCORE	95	/* Alphamosaic VideoCore processor */
+#define EM_TMM_GPP	96	/* Thompson Multimedia General Purpose Proc  */
+#define EM_NS32K	97	/* National Semiconductor 32000 series */
+#define EM_TPC		98	/* Tenor Network TPC processor */
+#define EM_SNP1K	99	/* Trebia SNP 1000 processor */
+#define EM_ST200	100	/* STMicroelectronics ST200 microcontroller */
+#define EM_IP2K		101	/* Ubicom IP2xxx microcontroller family */
+#define EM_MAX		102	/* MAX Processor */
+#define EM_CR		103	/* NatSemi CompactRISC microprocessor */
+#define EM_F2MC16	104	/* Fujitsu F2MC16 */
+#define EM_MSP430	105	/* TI embedded microcontroller msp430 */
+#define EM_BLACKFIN 	106	/* Analog Devices Blackfin (DSP) processor */
+#define EM_SE_C33 	107	/* S1C33 Family of Seiko Epson processors */
+#define EM_SEP		108	/* Sharp embedded microprocessor */
+#define EM_ARCA		109	/* Arca RISC Microprocessor */
+#define EM_UNICORE	110	/* Microprocessor series from PKU-Unity Ltd. */
+				/* and MPRC of Peking University */
+#define EM_NUM		111
+
 
 /* Non-standard or deprecated. */
-#define EM_486		6	/* Intel i486. */
+#define EM_486		6	/* now reserved - was Intel i486 */
 #define EM_MIPS_RS4_BE	10	/* MIPS R4000 Big-Endian */
-#define EM_ALPHA_STD	41	/* Digital Alpha (standard value). */
-#define EM_ALPHA	0x9026	/* Alpha (written in the absence of an ABI) */
+#define EM_ALPHA_NA	0x9026	/* Alpha (written in the absence of an ABI) */
 
 /* Special section indexes. */
 #define SHN_UNDEF	     0		/* Undefined, missing, irrelevant. */
@@ -201,6 +251,7 @@
 #define SHT_REL			9	/* relocation section - no addends */
 #define SHT_SHLIB		10	/* reserved - purpose unknown */
 #define SHT_DYNSYM		11	/* dynamic symbol table section */ 
+#define SHT_NUM			12	/* number of section types */
 #define SHT_INIT_ARRAY		14	/* Initialization function pointers. */
 #define SHT_FINI_ARRAY		15	/* Termination function pointers. */
 #define SHT_PREINIT_ARRAY	16	/* Pre-initialization function ptrs. */


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->kaiw 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Fri Mar 7 18:30:23 UTC 2008 
Responsible-Changed-Why:  
Over to bsdelf maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118540 
State-Changed-From-To: open->patched 
State-Changed-By: kaiw 
State-Changed-When: Mon Dec 29 12:32:35 UTC 2008 
State-Changed-Why:  


Slightly modified patch committed into HEAD. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118540 

From: "Pedro F. Giffuni" <giffunip@tutopia.com>
To: bug-followup@FreeBSD.org, kaiw@freeBSD.org
Cc:  
Subject: Re: kern/118540: [elf] [patch] update sys/sys/elf_common.h with new emachine types
Date: Fri, 14 Jan 2011 11:00:37 -0800 (PST)

 I think this PR can be closed now.
 
 As a side note, the SCO gabi spec does state:
 
 EM_ALPHA	41	Digital Alpha
 
 FreeBSD-Alpha used a different value as a placeholder but
 FreeBSD-Alpha is dead since 2008, and even if it somehow
 manages to resurrect, I think it should use the standard
 value.
 
 cheers,
 
 Pedro.
 
 
       
State-Changed-From-To: patched->closed 
State-Changed-By: kaiw 
State-Changed-When: Sun Jan 16 11:17:02 UTC 2011 
State-Changed-Why:  
PR closed per submitter's request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118540 
>Unformatted:
