From owner-p4-projects@FreeBSD.ORG Mon Aug 14 20:44:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0C10916A4E5; Mon, 14 Aug 2006 20:44:11 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9BB016A4E0 for ; Mon, 14 Aug 2006 20:44:10 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9ADB543D5D for ; Mon, 14 Aug 2006 20:44:07 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7EKi7ji027395 for ; Mon, 14 Aug 2006 20:44:07 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7EKi7op027392 for perforce@freebsd.org; Mon, 14 Aug 2006 20:44:07 GMT (envelope-from jb@freebsd.org) Date: Mon, 14 Aug 2006 20:44:07 GMT Message-Id: <200608142044.k7EKi7op027392@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103906 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 20:44:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=103906 Change 103906 by jb@jb_freebsd2 on 2006/08/14 20:43:22 Add more structures which are described in the Solaris Linker and Libraries Guide, the copy of which I have is dated Nov 2006. Hehehe. Affected files ... .. //depot/projects/dtrace/src/sys/sys/elf32.h#3 edit .. //depot/projects/dtrace/src/sys/sys/elf64.h#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/sys/elf32.h#3 (text+ko) ==== @@ -40,6 +40,7 @@ typedef uint32_t Elf32_Off; typedef int32_t Elf32_Sword; typedef uint32_t Elf32_Word; +typedef uint64_t Elf32_Lword; typedef Elf32_Word Elf32_Hashelt; @@ -138,6 +139,48 @@ #define ELF32_R_INFO(sym, type) (((sym) << 8) + (unsigned char)(type)) /* + * Note entry header + */ +typedef struct { + Elf32_Word n_namesz; /* length of note's name */ + Elf32_Word n_descsz; /* length of note's "desc" */ + Elf32_Word n_type; /* type of note */ +} Elf32_Nhdr; + +/* + * Move entry + */ +typedef struct { + Elf32_Lword m_value; /* symbol value */ + Elf32_Word m_info; /* size + index */ + Elf32_Word m_poffset; /* symbol offset */ + Elf32_Half m_repeat; /* repeat count */ + Elf32_Half m_stride; /* stride info */ +} Elf32_Move; + +/* + * The macros compose and decompose values for Move.r_info + * + * sym = ELF32_M_SYM(M.m_info) + * size = ELF32_M_SIZE(M.m_info) + * M.m_info = ELF32_M_INFO(sym, size) + */ +#define ELF32_M_SYM(info) ((info)>>8) +#define ELF32_M_SIZE(info) ((unsigned char)(info)) +#define ELF32_M_INFO(sym, size) (((sym)<<8)+(unsigned char)(size)) + +/* + * Hardware/Software capabilities entry + */ +typedef struct { + Elf32_Word c_tag; /* how to interpret value */ + union { + Elf32_Word c_val; + Elf32_Addr c_ptr; + } c_un; +} Elf32_Cap; + +/* * Symbol table entries. */ @@ -198,4 +241,9 @@ typedef Elf32_Half Elf32_Versym; +typedef struct { + Elf32_Half si_boundto; /* direct bindings - symbol bound to */ + Elf32_Half si_flags; /* per symbol flags */ +} Elf32_Syminfo; + #endif /* !_SYS_ELF32_H_ */ ==== //depot/projects/dtrace/src/sys/sys/elf64.h#4 (text+ko) ==== @@ -41,6 +41,7 @@ typedef int32_t Elf64_Sword; typedef int64_t Elf64_Sxword; typedef uint32_t Elf64_Word; +typedef uint64_t Elf64_Lword; typedef uint64_t Elf64_Xword; /* @@ -147,6 +148,41 @@ #define ELF64_R_INFO(sym, type) (((sym) << 32) + ((type) & 0xffffffffL)) /* + * Note entry header + */ +typedef struct { + Elf64_Word n_namesz; /* length of note's name */ + Elf64_Word n_descsz; /* length of note's "desc" */ + Elf64_Word n_type; /* type of note */ +} Elf64_Nhdr; + +/* + * Move entry + */ +typedef struct { + 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_Move; + +#define ELF64_M_SYM(info) ((info)>>8) +#define ELF64_M_SIZE(info) ((unsigned char)(info)) +#define ELF64_M_INFO(sym, size) (((sym)<<8)+(unsigned char)(size)) + +/* + * Hardware/Software capabilities entry + */ +typedef struct { + Elf64_Xword c_tag; /* how to interpret value */ + union { + Elf64_Xword c_val; + Elf64_Addr c_ptr; + } c_un; +} Elf64_Cap; + +/* * Symbol table entries. */ @@ -203,4 +239,9 @@ typedef Elf64_Half Elf64_Versym; +typedef struct { + Elf64_Half si_boundto; /* direct bindings - symbol bound to */ + Elf64_Half si_flags; /* per symbol flags */ +} Elf64_Syminfo; + #endif /* !_SYS_ELF64_H_ */