Print this page
Code review comments from jeffpc
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/exec/elf/elf_impl.h
+++ new/usr/src/uts/common/exec/elf/elf_impl.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 #ifndef _ELF_ELF_IMPL_H
27 27 #define _ELF_ELF_IMPL_H
28 28
29 +#pragma ident "%Z%%M% %I% %E% SMI"
30 +
29 31 #ifdef __cplusplus
30 32 extern "C" {
31 33 #endif
32 34
33 35 #if !defined(_LP64) || defined(_ELF32_COMPAT)
34 36
35 37 /*
36 38 * Definitions for ELF32, native 32-bit or 32-bit compatibility mode.
37 39 */
38 40 #define ELFCLASS ELFCLASS32
39 41 typedef unsigned int aux_val_t;
40 42 typedef auxv32_t aux_entry_t;
41 43
42 44 #define USR_LIB_RTLD "/usr/lib/ld.so.1"
43 45
44 46 #else /* !_LP64 || _ELF32_COMPAT */
45 47
46 48 /*
47 49 * Definitions for native 64-bit ELF
48 50 */
49 51 #define ELFCLASS ELFCLASS64
50 52 typedef unsigned long aux_val_t;
51 53 typedef auxv_t aux_entry_t;
52 54
53 55 /* put defines for 64-bit architectures here */
54 56 #if defined(__sparcv9)
55 57 #define USR_LIB_RTLD "/usr/lib/sparcv9/ld.so.1"
56 58 #endif
57 59
58 60 #if defined(__amd64)
59 61 #define USR_LIB_RTLD "/usr/lib/amd64/ld.so.1"
60 62 #endif
61 63
62 64 #endif /* !_LP64 || _ELF32_COMPAT */
63 65
64 66 /*
65 67 * Start of an ELF Note.
66 68 */
67 69 typedef struct {
68 70 Nhdr nhdr;
69 71 char name[8];
70 72 } Note;
71 73
72 74 #ifdef _ELF32_COMPAT
73 75 /*
74 76 * These are defined only for the 32-bit compatibility
75 77 * compilation mode of the 64-bit kernel.
76 78 */
77 79 #define elfexec elf32exec
78 80 #define elfnote elf32note
79 81 #define elfcore elf32core
80 82 #define mapexec_brand mapexec32_brand
81 83 #define setup_note_header setup_note_header32
82 84 #define write_elfnotes write_elfnotes32
83 85 #define setup_old_note_header setup_old_note_header32
84 86 #define write_old_elfnotes write_old_elfnotes32
85 87
86 88 #if defined(__sparc)
87 89 #define gwindows_t gwindows32_t
88 90 #define rwindow rwindow32
89 91 #endif
90 92
91 93 #define psinfo_t psinfo32_t
92 94 #define pstatus_t pstatus32_t
93 95 #define lwpsinfo_t lwpsinfo32_t
94 96 #define lwpstatus_t lwpstatus32_t
95 97
96 98 #define prgetpsinfo prgetpsinfo32
97 99 #define prgetstatus prgetstatus32
98 100 #define prgetlwpsinfo prgetlwpsinfo32
99 101 #define prgetlwpstatus prgetlwpstatus32
100 102 #define prgetwindows prgetwindows32
101 103
102 104 #define prpsinfo_t prpsinfo32_t
103 105 #define prstatus_t prstatus32_t
104 106 #if defined(prfpregset_t)
105 107 #undef prfpregset_t
106 108 #endif
107 109 #define prfpregset_t prfpregset32_t
108 110
109 111 #define oprgetstatus oprgetstatus32
110 112 #define oprgetpsinfo oprgetpsinfo32
111 113 #define prgetprfpregs prgetprfpregs32
112 114
113 115 #endif /* _ELF32_COMPAT */
114 116
115 117 extern int elfnote(vnode_t *, offset_t *, int, int, void *, rlim64_t, cred_t *);
116 118 extern void setup_old_note_header(Phdr *, proc_t *);
117 119 extern void setup_note_header(Phdr *, proc_t *);
118 120
119 121 extern int write_old_elfnotes(proc_t *, int, vnode_t *, offset_t,
120 122 rlim64_t, cred_t *);
121 123
122 124 extern int write_elfnotes(proc_t *, int, vnode_t *, offset_t,
123 125 rlim64_t, cred_t *, core_content_t);
124 126
125 127 #ifdef __cplusplus
126 128 }
127 129 #endif
128 130
129 131 #endif /* _ELF_ELF_IMPL_H */
↓ open down ↓ |
91 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX