Module Name:    src
Committed By:   joerg
Date:           Sat Aug 28 21:30:03 UTC 2010

Modified Files:
        src/lib/libc/gen: nlist_elf32.c
        src/sys/arch/atari/stand/tostools/libtos: exec_elf.h
        src/sys/arch/xen/include/xen3-public: elfstructs.h
        src/sys/sys: exec_elf.h
        src/tools/amiga-elf2bb/sys: exec_elf.h
        src/tools/mips-elf2ecoff/sys: exec_elf.h
        src/usr.sbin/kvm_mkdb: nlist_elf32.c
        src/usr.sbin/mdsetimage: exec_elf32.c

Log Message:
Replace the current usage of Elf64_Half with Elf64_Word and rename
NetBSD specific Elf64_Quarter to Elf64_Half. This restores compatibility
with the common ELF specifications.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/gen/nlist_elf32.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/atari/stand/tostools/libtos/exec_elf.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/xen/include/xen3-public/elfstructs.h
cvs rdiff -u -r1.102 -r1.103 src/sys/sys/exec_elf.h
cvs rdiff -u -r1.2 -r1.3 src/tools/amiga-elf2bb/sys/exec_elf.h
cvs rdiff -u -r1.3 -r1.4 src/tools/mips-elf2ecoff/sys/exec_elf.h
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/kvm_mkdb/nlist_elf32.c
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/mdsetimage/exec_elf32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/nlist_elf32.c
diff -u src/lib/libc/gen/nlist_elf32.c:1.31 src/lib/libc/gen/nlist_elf32.c:1.32
--- src/lib/libc/gen/nlist_elf32.c:1.31	Fri Aug 21 08:42:02 2009
+++ src/lib/libc/gen/nlist_elf32.c	Sat Aug 28 21:30:02 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: nlist_elf32.c,v 1.31 2009/08/21 08:42:02 he Exp $ */
+/* $NetBSD: nlist_elf32.c,v 1.32 2010/08/28 21:30:02 joerg Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: nlist_elf32.c,v 1.31 2009/08/21 08:42:02 he Exp $");
+__RCSID("$NetBSD: nlist_elf32.c,v 1.32 2010/08/28 21:30:02 joerg Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 /* If not included by nlist_elf64.c, ELFSIZE won't be defined. */
@@ -89,7 +89,7 @@
 #if (ELFSIZE == 32)
 	Elf32_Half nshdr;
 #elif (ELFSIZE == 64)
-	Elf64_Half nshdr;
+	Elf64_Word nshdr;
 #endif
 	size_t i, nsyms;
 	int rv, nent;

Index: src/sys/arch/atari/stand/tostools/libtos/exec_elf.h
diff -u src/sys/arch/atari/stand/tostools/libtos/exec_elf.h:1.5 src/sys/arch/atari/stand/tostools/libtos/exec_elf.h:1.6
--- src/sys/arch/atari/stand/tostools/libtos/exec_elf.h:1.5	Mon Apr 28 20:23:15 2008
+++ src/sys/arch/atari/stand/tostools/libtos/exec_elf.h	Sat Aug 28 21:30:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.5 2008/04/28 20:23:15 martin Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.6 2010/08/28 21:30:02 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -95,10 +95,8 @@
 #define	ELF64_FSZ_XWORD	8
 typedef	__uint64_t	Elf64_Xword;
 #define	ELF64_FSZ_XWORD	8
-typedef	__uint32_t	Elf64_Half;
-#define	ELF64_FSZ_HALF	4
-typedef	__uint16_t	Elf64_Quarter;
-#define	ELF64_FSZ_QUARTER 2
+typedef	__uint16_t	Elf64_Half;
+#define	ELF64_FSZ_HALF 2
 
 /*
  * ELF Header

Index: src/sys/arch/xen/include/xen3-public/elfstructs.h
diff -u src/sys/arch/xen/include/xen3-public/elfstructs.h:1.2 src/sys/arch/xen/include/xen3-public/elfstructs.h:1.3
--- src/sys/arch/xen/include/xen3-public/elfstructs.h:1.2	Sun Sep 23 16:25:29 2007
+++ src/sys/arch/xen/include/xen3-public/elfstructs.h	Sat Aug 28 21:30:02 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: elfstructs.h,v 1.2 2007/09/23 16:25:29 bouyer Exp $ */
+/* $NetBSD: elfstructs.h,v 1.3 2010/08/28 21:30:02 joerg Exp $ */
 #ifndef __XEN_PUBLIC_ELFSTRUCTS_H__
 #define __XEN_PUBLIC_ELFSTRUCTS_H__ 1
 /*
@@ -44,9 +44,7 @@
 
 typedef int64_t		Elf64_Sxword;
 typedef uint64_t	Elf64_Xword;
-
-typedef uint32_t	Elf64_Half;
-typedef uint16_t	Elf64_Quarter;
+typedef uint16_t	Elf64_Half;
 
 /*
  * e_ident[] identification indexes
@@ -128,19 +126,19 @@
 
 typedef struct {
 	unsigned char	e_ident[EI_NIDENT];	/* Id bytes */
-	Elf64_Quarter	e_type;			/* file type */
-	Elf64_Quarter	e_machine;		/* machine type */
-	Elf64_Half	e_version;		/* version number */
+	Elf64_Half	e_type;			/* file type */
+	Elf64_Half	e_machine;		/* machine type */
+	Elf64_Word	e_version;		/* version number */
 	Elf64_Addr	e_entry;		/* entry point */
 	Elf64_Off	e_phoff;		/* Program hdr offset */
 	Elf64_Off	e_shoff;		/* Section hdr offset */
-	Elf64_Half	e_flags;		/* Processor flags */
-	Elf64_Quarter	e_ehsize;		/* sizeof ehdr */
-	Elf64_Quarter	e_phentsize;		/* Program header entry size */
-	Elf64_Quarter	e_phnum;		/* Number of program headers */
-	Elf64_Quarter	e_shentsize;		/* Section header entry size */
-	Elf64_Quarter	e_shnum;		/* Number of section headers */
-	Elf64_Quarter	e_shstrndx;		/* String table index */
+	Elf64_Word	e_flags;		/* Processor flags */
+	Elf64_Half	e_ehsize;		/* sizeof ehdr */
+	Elf64_Half	e_phentsize;		/* Program header entry size */
+	Elf64_Half	e_phnum;		/* Number of program headers */
+	Elf64_Half	e_shentsize;		/* Section header entry size */
+	Elf64_Half	e_shnum;		/* Number of section headers */
+	Elf64_Half	e_shstrndx;		/* String table index */
 } Elf64_Ehdr;
 
 /* e_type */
@@ -203,14 +201,14 @@
 } Elf32_Shdr;
 
 typedef struct {
-	Elf64_Half	sh_name;	/* section name */
-	Elf64_Half	sh_type;	/* section type */
+	Elf64_Word	sh_name;	/* section name */
+	Elf64_Word	sh_type;	/* section type */
 	Elf64_Xword	sh_flags;	/* section flags */
 	Elf64_Addr	sh_addr;	/* virtual address */
 	Elf64_Off	sh_offset;	/* file offset */
 	Elf64_Xword	sh_size;	/* section size */
-	Elf64_Half	sh_link;	/* link to another */
-	Elf64_Half	sh_info;	/* misc info */
+	Elf64_Word	sh_link;	/* link to another */
+	Elf64_Word	sh_info;	/* misc info */
 	Elf64_Xword	sh_addralign;	/* memory alignment */
 	Elf64_Xword	sh_entsize;	/* table entry size */
 } Elf64_Shdr;
@@ -285,10 +283,10 @@
 } Elf32_Sym;
 
 typedef struct {
-	Elf64_Half	st_name;	/* Symbol name index in str table */
+	Elf64_Word	st_name;	/* Symbol name index in str table */
 	Elf_Byte	st_info;	/* type / binding attrs */
 	Elf_Byte	st_other;	/* unused */
-	Elf64_Quarter	st_shndx;	/* section index of symbol */
+	Elf64_Half	st_shndx;	/* section index of symbol */
 	Elf64_Xword	st_value;	/* value of symbol */
 	Elf64_Xword	st_size;	/* size of symbol */
 } Elf64_Sym;
@@ -369,8 +367,8 @@
 } Elf32_Phdr;
 
 typedef struct {
-	Elf64_Half	p_type;		/* entry type */
-	Elf64_Half	p_flags;	/* flags */
+	Elf64_Word	p_type;		/* entry type */
+	Elf64_Word	p_flags;	/* flags */
 	Elf64_Off	p_offset;	/* offset */
 	Elf64_Addr	p_vaddr;	/* virtual address */
 	Elf64_Addr	p_paddr;	/* physical address */
@@ -459,9 +457,9 @@
 } Elf32_Note;
 
 typedef struct {
-	Elf64_Half namesz;
-	Elf64_Half descsz;
-	Elf64_Half type;
+	Elf64_Word namesz;
+	Elf64_Word descsz;
+	Elf64_Word type;
 } Elf64_Note;
 
 

Index: src/sys/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.102 src/sys/sys/exec_elf.h:1.103
--- src/sys/sys/exec_elf.h:1.102	Mon Mar  1 11:27:29 2010
+++ src/sys/sys/exec_elf.h	Sat Aug 28 21:30:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.102 2010/03/01 11:27:29 skrll Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.103 2010/08/28 21:30:02 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -99,10 +99,8 @@
 #define	ELF64_FSZ_XWORD	8
 typedef	uint64_t	Elf64_Lword;
 #define	ELF64_FSZ_LWORD	8
-typedef	uint32_t	Elf64_Half;
-#define	ELF64_FSZ_HALF	4
-typedef	uint16_t	Elf64_Quarter;
-#define	ELF64_FSZ_QUARTER 2
+typedef	uint16_t	Elf64_Half;
+#define	ELF64_FSZ_HALF 2
 
 /*
  * ELF Header
@@ -128,19 +126,19 @@
 
 typedef struct {
 	unsigned char	e_ident[ELF_NIDENT];	/* Id bytes */
-	Elf64_Quarter	e_type;			/* file type */
-	Elf64_Quarter	e_machine;		/* machine type */
-	Elf64_Half	e_version;		/* version number */
+	Elf64_Half	e_type;			/* file type */
+	Elf64_Half	e_machine;		/* machine type */
+	Elf64_Word	e_version;		/* version number */
 	Elf64_Addr	e_entry;		/* entry point */
 	Elf64_Off	e_phoff;		/* Program hdr offset */
 	Elf64_Off	e_shoff;		/* Section hdr offset */
-	Elf64_Half	e_flags;		/* Processor flags */
-	Elf64_Quarter	e_ehsize;		/* sizeof ehdr */
-	Elf64_Quarter	e_phentsize;		/* Program header entry size */
-	Elf64_Quarter	e_phnum;		/* Number of program headers */
-	Elf64_Quarter	e_shentsize;		/* Section header entry size */
-	Elf64_Quarter	e_shnum;		/* Number of section headers */
-	Elf64_Quarter	e_shstrndx;		/* String table index */
+	Elf64_Word	e_flags;		/* Processor flags */
+	Elf64_Half	e_ehsize;		/* sizeof ehdr */
+	Elf64_Half	e_phentsize;		/* Program header entry size */
+	Elf64_Half	e_phnum;		/* Number of program headers */
+	Elf64_Half	e_shentsize;		/* Section header entry size */
+	Elf64_Half	e_shnum;		/* Number of section headers */
+	Elf64_Half	e_shstrndx;		/* String table index */
 } Elf64_Ehdr;
 
 /* e_ident offsets */
@@ -336,8 +334,8 @@
 } Elf32_Phdr;
 
 typedef struct {
-	Elf64_Half	p_type;		/* entry type */
-	Elf64_Half	p_flags;	/* flags */
+	Elf64_Word	p_type;		/* entry type */
+	Elf64_Word	p_flags;	/* flags */
 	Elf64_Off	p_offset;	/* offset */
 	Elf64_Addr	p_vaddr;	/* virtual address */
 	Elf64_Addr	p_paddr;	/* physical address */
@@ -391,14 +389,14 @@
 } Elf32_Shdr;
 
 typedef struct {
-	Elf64_Half	sh_name;	/* section name (.shstrtab index) */
-	Elf64_Half	sh_type;	/* section type */
+	Elf64_Word	sh_name;	/* section name (.shstrtab index) */
+	Elf64_Word	sh_type;	/* section type */
 	Elf64_Xword	sh_flags;	/* section flags */
 	Elf64_Addr	sh_addr;	/* virtual address */
 	Elf64_Off	sh_offset;	/* file offset */
 	Elf64_Xword	sh_size;	/* section size */
-	Elf64_Half	sh_link;	/* link to another */
-	Elf64_Half	sh_info;	/* misc info */
+	Elf64_Word	sh_link;	/* link to another */
+	Elf64_Word	sh_info;	/* misc info */
 	Elf64_Xword	sh_addralign;	/* memory alignment */
 	Elf64_Xword	sh_entsize;	/* table entry size */
 } Elf64_Shdr;
@@ -460,10 +458,10 @@
 } Elf32_Sym;
 
 typedef struct {
-	Elf64_Half	st_name;	/* Symbol name (.strtab index) */
+	Elf64_Word	st_name;	/* Symbol name (.strtab index) */
 	Elf_Byte	st_info;	/* type / binding attrs */
 	Elf_Byte	st_other;	/* unused */
-	Elf64_Quarter	st_shndx;	/* section index of symbol */
+	Elf64_Half	st_shndx;	/* section index of symbol */
 	Elf64_Addr	st_value;	/* value of symbol */
 	Elf64_Xword	st_size;	/* size of symbol */
 } Elf64_Sym;
@@ -590,8 +588,8 @@
 	Elf64_Lword	m_value;	/* symbol value */
 	Elf64_Xword	m_info;		/* size + index */
 	Elf64_Xword	m_poffset;	/* symbol offset */
-	Elf64_Half	m_repeat;	/* repeat count */
-	Elf64_Half	m_stride;	/* stride info */
+	Elf64_Word	m_repeat;	/* repeat count */
+	Elf64_Word	m_stride;	/* stride info */
 } Elf64_Move;
 
 #define	ELF64_M_SYM(info)	((info) >> 8)
@@ -691,7 +689,7 @@
 } Aux32Info;
 
 typedef struct {
-	Elf64_Half	a_type;				/* 32-bit id */
+	Elf64_Word	a_type;				/* 32-bit id */
 	Elf64_Xword	a_v;				/* 64-bit id */
 } Aux64Info;
 
@@ -745,9 +743,9 @@
 } Elf32_Nhdr;
 
 typedef struct {
-	Elf64_Half n_namesz;
-	Elf64_Half n_descsz;
-	Elf64_Half n_type;
+	Elf64_Word n_namesz;
+	Elf64_Word n_descsz;
+	Elf64_Word n_type;
 } Elf64_Nhdr;
 
 #define	ELF_NOTE_TYPE_ABI_TAG		1
@@ -905,8 +903,8 @@
 } Elf32_Syminfo;
 
 typedef struct {
-	Elf64_Half	si_boundto;	/* direct bindings - symbol bound to */
-	Elf64_Half	si_flags;	/* per symbol flags */
+	Elf64_Word	si_boundto;	/* direct bindings - symbol bound to */
+	Elf64_Word	si_flags;	/* per symbol flags */
 } Elf64_Syminfo;
 
 #define	SYMINFO_FLG_DIRECT	0x0001	/* symbol ref has direct association

Index: src/tools/amiga-elf2bb/sys/exec_elf.h
diff -u src/tools/amiga-elf2bb/sys/exec_elf.h:1.2 src/tools/amiga-elf2bb/sys/exec_elf.h:1.3
--- src/tools/amiga-elf2bb/sys/exec_elf.h:1.2	Mon Apr 28 20:24:12 2008
+++ src/tools/amiga-elf2bb/sys/exec_elf.h	Sat Aug 28 21:30:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.2 2008/04/28 20:24:12 martin Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.3 2010/08/28 21:30:02 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -79,10 +79,8 @@
 #define	ELF64_FSZ_XWORD	8
 typedef	uint64_t	Elf64_Xword;
 #define	ELF64_FSZ_XWORD	8
-typedef	uint32_t	Elf64_Half;
-#define	ELF64_FSZ_HALF	4
-typedef	uint16_t	Elf64_Quarter;
-#define	ELF64_FSZ_QUARTER 2
+typedef	uint16_t	Elf64_Half;
+#define	ELF64_FSZ_HALF 2
 
 /*
  * ELF Header
@@ -108,19 +106,19 @@
 
 typedef struct {
 	unsigned char	e_ident[ELF_NIDENT];	/* Id bytes */
-	Elf64_Quarter	e_type;			/* file type */
-	Elf64_Quarter	e_machine;		/* machine type */
-	Elf64_Half	e_version;		/* version number */
+	Elf64_Half	e_type;			/* file type */
+	Elf64_Half	e_machine;		/* machine type */
+	Elf64_Word	e_version;		/* version number */
 	Elf64_Addr	e_entry;		/* entry point */
 	Elf64_Off	e_phoff;		/* Program hdr offset */
 	Elf64_Off	e_shoff;		/* Section hdr offset */
-	Elf64_Half	e_flags;		/* Processor flags */
-	Elf64_Quarter	e_ehsize;		/* sizeof ehdr */
-	Elf64_Quarter	e_phentsize;		/* Program header entry size */
-	Elf64_Quarter	e_phnum;		/* Number of program headers */
-	Elf64_Quarter	e_shentsize;		/* Section header entry size */
-	Elf64_Quarter	e_shnum;		/* Number of section headers */
-	Elf64_Quarter	e_shstrndx;		/* String table index */
+	Elf64_Word	e_flags;		/* Processor flags */
+	Elf64_Half	e_ehsize;		/* sizeof ehdr */
+	Elf64_Half	e_phentsize;		/* Program header entry size */
+	Elf64_Half	e_phnum;		/* Number of program headers */
+	Elf64_Half	e_shentsize;		/* Section header entry size */
+	Elf64_Half	e_shnum;		/* Number of section headers */
+	Elf64_Half	e_shstrndx;		/* String table index */
 } Elf64_Ehdr;
 
 /* e_ident offsets */
@@ -293,8 +291,8 @@
 } Elf32_Phdr;
 
 typedef struct {
-	Elf64_Half	p_type;		/* entry type */
-	Elf64_Half	p_flags;	/* flags */
+	Elf64_Word	p_type;		/* entry type */
+	Elf64_Word	p_flags;	/* flags */
 	Elf64_Off	p_offset;	/* offset */
 	Elf64_Addr	p_vaddr;	/* virtual address */
 	Elf64_Addr	p_paddr;	/* physical address */
@@ -345,14 +343,14 @@
 } Elf32_Shdr;
 
 typedef struct {
-	Elf64_Half	sh_name;	/* section name (.shstrtab index) */
-	Elf64_Half	sh_type;	/* section type */
+	Elf64_Word	sh_name;	/* section name (.shstrtab index) */
+	Elf64_Word	sh_type;	/* section type */
 	Elf64_Xword	sh_flags;	/* section flags */
 	Elf64_Addr	sh_addr;	/* virtual address */
 	Elf64_Off	sh_offset;	/* file offset */
 	Elf64_Xword	sh_size;	/* section size */
-	Elf64_Half	sh_link;	/* link to another */
-	Elf64_Half	sh_info;	/* misc info */
+	Elf64_Word	sh_link;	/* link to another */
+	Elf64_Word	sh_info;	/* misc info */
 	Elf64_Xword	sh_addralign;	/* memory alignment */
 	Elf64_Xword	sh_entsize;	/* table entry size */
 } Elf64_Shdr;
@@ -400,10 +398,10 @@
 } Elf32_Sym;
 
 typedef struct {
-	Elf64_Half	st_name;	/* Symbol name (.symtab index) */
+	Elf64_Word	st_name;	/* Symbol name (.symtab index) */
 	Elf_Byte	st_info;	/* type / binding attrs */
 	Elf_Byte	st_other;	/* unused */
-	Elf64_Quarter	st_shndx;	/* section index of symbol */
+	Elf64_Half	st_shndx;	/* section index of symbol */
 	Elf64_Addr	st_value;	/* value of symbol */
 	Elf64_Xword	st_size;	/* size of symbol */
 } Elf64_Sym;
@@ -564,7 +562,7 @@
 } Aux32Info;
 
 typedef struct {
-	Elf64_Half	a_type;				/* 32-bit id */
+	Elf64_Word	a_type;				/* 32-bit id */
 	Elf64_Xword	a_v;				/* 64-bit id */
 } Aux64Info;
 
@@ -618,9 +616,9 @@
 } Elf32_Nhdr;
 
 typedef struct {
-	Elf64_Half n_namesz;
-	Elf64_Half n_descsz;
-	Elf64_Half n_type;
+	Elf64_Word n_namesz;
+	Elf64_Word n_descsz;
+	Elf64_Word n_type;
 } Elf64_Nhdr;
 
 #define	ELF_NOTE_TYPE_ABI_TAG		1

Index: src/tools/mips-elf2ecoff/sys/exec_elf.h
diff -u src/tools/mips-elf2ecoff/sys/exec_elf.h:1.3 src/tools/mips-elf2ecoff/sys/exec_elf.h:1.4
--- src/tools/mips-elf2ecoff/sys/exec_elf.h:1.3	Mon Apr 28 20:24:12 2008
+++ src/tools/mips-elf2ecoff/sys/exec_elf.h	Sat Aug 28 21:30:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.3 2008/04/28 20:24:12 martin Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.4 2010/08/28 21:30:02 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -79,10 +79,8 @@
 #define	ELF64_FSZ_XWORD	8
 typedef	uint64_t	Elf64_Xword;
 #define	ELF64_FSZ_XWORD	8
-typedef	uint32_t	Elf64_Half;
-#define	ELF64_FSZ_HALF	4
-typedef	uint16_t	Elf64_Quarter;
-#define	ELF64_FSZ_QUARTER 2
+typedef	uint16_t	Elf64_Half;
+#define	ELF64_FSZ_HALF 2
 
 /*
  * ELF Header
@@ -108,19 +106,19 @@
 
 typedef struct {
 	unsigned char	e_ident[ELF_NIDENT];	/* Id bytes */
-	Elf64_Quarter	e_type;			/* file type */
-	Elf64_Quarter	e_machine;		/* machine type */
-	Elf64_Half	e_version;		/* version number */
+	Elf64_Half	e_type;			/* file type */
+	Elf64_Half	e_machine;		/* machine type */
+	Elf64_Word	e_version;		/* version number */
 	Elf64_Addr	e_entry;		/* entry point */
 	Elf64_Off	e_phoff;		/* Program hdr offset */
 	Elf64_Off	e_shoff;		/* Section hdr offset */
-	Elf64_Half	e_flags;		/* Processor flags */
-	Elf64_Quarter	e_ehsize;		/* sizeof ehdr */
-	Elf64_Quarter	e_phentsize;		/* Program header entry size */
-	Elf64_Quarter	e_phnum;		/* Number of program headers */
-	Elf64_Quarter	e_shentsize;		/* Section header entry size */
-	Elf64_Quarter	e_shnum;		/* Number of section headers */
-	Elf64_Quarter	e_shstrndx;		/* String table index */
+	Elf64_Word	e_flags;		/* Processor flags */
+	Elf64_Half	e_ehsize;		/* sizeof ehdr */
+	Elf64_Half	e_phentsize;		/* Program header entry size */
+	Elf64_Half	e_phnum;		/* Number of program headers */
+	Elf64_Half	e_shentsize;		/* Section header entry size */
+	Elf64_Half	e_shnum;		/* Number of section headers */
+	Elf64_Half	e_shstrndx;		/* String table index */
 } Elf64_Ehdr;
 
 /* e_ident offsets */
@@ -291,8 +289,8 @@
 } Elf32_Phdr;
 
 typedef struct {
-	Elf64_Half	p_type;		/* entry type */
-	Elf64_Half	p_flags;	/* flags */
+	Elf64_Word	p_type;		/* entry type */
+	Elf64_Word	p_flags;	/* flags */
 	Elf64_Off	p_offset;	/* offset */
 	Elf64_Addr	p_vaddr;	/* virtual address */
 	Elf64_Addr	p_paddr;	/* physical address */
@@ -341,14 +339,14 @@
 } Elf32_Shdr;
 
 typedef struct {
-	Elf64_Half	sh_name;	/* section name (.shstrtab index) */
-	Elf64_Half	sh_type;	/* section type */
+	Elf64_Word	sh_name;	/* section name (.shstrtab index) */
+	Elf64_Word	sh_type;	/* section type */
 	Elf64_Xword	sh_flags;	/* section flags */
 	Elf64_Addr	sh_addr;	/* virtual address */
 	Elf64_Off	sh_offset;	/* file offset */
 	Elf64_Xword	sh_size;	/* section size */
-	Elf64_Half	sh_link;	/* link to another */
-	Elf64_Half	sh_info;	/* misc info */
+	Elf64_Word	sh_link;	/* link to another */
+	Elf64_Word	sh_info;	/* misc info */
 	Elf64_Xword	sh_addralign;	/* memory alignment */
 	Elf64_Xword	sh_entsize;	/* table entry size */
 } Elf64_Shdr;
@@ -396,10 +394,10 @@
 } Elf32_Sym;
 
 typedef struct {
-	Elf64_Half	st_name;	/* Symbol name (.symtab index) */
+	Elf64_Word	st_name;	/* Symbol name (.symtab index) */
 	Elf_Byte	st_info;	/* type / binding attrs */
 	Elf_Byte	st_other;	/* unused */
-	Elf64_Quarter	st_shndx;	/* section index of symbol */
+	Elf64_Half	st_shndx;	/* section index of symbol */
 	Elf64_Addr	st_value;	/* value of symbol */
 	Elf64_Xword	st_size;	/* size of symbol */
 } Elf64_Sym;
@@ -560,7 +558,7 @@
 } Aux32Info;
 
 typedef struct {
-	Elf64_Half	a_type;				/* 32-bit id */
+	Elf64_Word	a_type;				/* 32-bit id */
 	Elf64_Xword	a_v;				/* 64-bit id */
 } Aux64Info;
 
@@ -614,9 +612,9 @@
 } Elf32_Nhdr;
 
 typedef struct {
-	Elf64_Half n_namesz;
-	Elf64_Half n_descsz;
-	Elf64_Half n_type;
+	Elf64_Word n_namesz;
+	Elf64_Word n_descsz;
+	Elf64_Word n_type;
 } Elf64_Nhdr;
 
 #define	ELF_NOTE_TYPE_ABI_TAG		1

Index: src/usr.sbin/kvm_mkdb/nlist_elf32.c
diff -u src/usr.sbin/kvm_mkdb/nlist_elf32.c:1.18 src/usr.sbin/kvm_mkdb/nlist_elf32.c:1.19
--- src/usr.sbin/kvm_mkdb/nlist_elf32.c:1.18	Wed Nov 12 13:31:07 2003
+++ src/usr.sbin/kvm_mkdb/nlist_elf32.c	Sat Aug 28 21:30:03 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: nlist_elf32.c,v 1.18 2003/11/12 13:31:07 grant Exp $ */
+/* $NetBSD: nlist_elf32.c,v 1.19 2010/08/28 21:30:03 joerg Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: nlist_elf32.c,v 1.18 2003/11/12 13:31:07 grant Exp $");
+__RCSID("$NetBSD: nlist_elf32.c,v 1.19 2010/08/28 21:30:03 joerg Exp $");
 #endif /* not lint */
 
 /* If not included by nlist_elf64.c, ELFSIZE won't be defined. */
@@ -107,7 +107,7 @@
 #if (ELFSIZE == 32)
 	Elf32_Half nshdr;
 #elif (ELFSIZE == 64)
-	Elf64_Half nshdr;
+	Elf64_Word nshdr;
 #endif
 	unsigned long i, nsyms;
 	int fd, rv, malloced = 0, isksyms;

Index: src/usr.sbin/mdsetimage/exec_elf32.c
diff -u src/usr.sbin/mdsetimage/exec_elf32.c:1.11 src/usr.sbin/mdsetimage/exec_elf32.c:1.12
--- src/usr.sbin/mdsetimage/exec_elf32.c:1.11	Thu Jul 30 15:56:01 2009
+++ src/usr.sbin/mdsetimage/exec_elf32.c	Sat Aug 28 21:30:03 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf32.c,v 1.11 2009/07/30 15:56:01 tsutsui Exp $ */
+/* $NetBSD: exec_elf32.c,v 1.12 2010/08/28 21:30:03 joerg Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: exec_elf32.c,v 1.11 2009/07/30 15:56:01 tsutsui Exp $");
+__RCSID("$NetBSD: exec_elf32.c,v 1.12 2010/08/28 21:30:03 joerg Exp $");
 #endif /* not lint */
 
 #ifndef ELFSIZE
@@ -95,7 +95,7 @@
 #if (ELFSIZE == 32)
 	Elf32_Half nphdr, i;
 #elif (ELFSIZE == 64)
-	Elf64_Half nphdr, i;
+	Elf64_Word nphdr, i;
 #endif
 	int rv;
 

Reply via email to