Date: Mon, 14 Aug 2006 20:44:07 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 103906 for review Message-ID: <200608142044.k7EKi7op027392@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608142044.k7EKi7op027392>