1 sgsmsg(1l) sgsmsg(1l)
2
3
4
5 NAME
6 sgsmsg - generate message strings for SGS subsystem.
7
8 SYNOPSIS
9 sgsmsg [ -cl ] [ -d data ] [ -h defs ] [ -i ident ]
10 [ -m messages ] [ -n name ] file ...
11
12 AVAILABILITY
13 SUNWonld
14
15 DESCRIPTION
16 sgsmsg generates several message files from an input string definition
17 file. sgsmsg provides a flexible, centralized, mechanism of collecting
18 character strings within a code group such as an executable or shared
19 object. All character strings are captured into a single data array
20 within the data file. The data array is similar to that produced by
21 xstr(1)), and helps reduce the relocation overhead incurred by string
118
119 The following ident file provides message identifiers for the link-
120 editor utilities ld(1), libld.so.2, and liblddbg.so.3. These
121 identifiers are referenced from the input string definition files of
122 the respective code groups:
123
124 % cat sgs.ident
125
126 # mesgid setiddomain
127
128 MSG_ID_LD 1 SUNW_OST_SGS
129 MSG_ID_LIBLD 2 SUNW_OST_SGS
130 MSG_ID_LIBLDDBG 3 SUNW_OST_SGS
131
132
133 The following string definition file defines a small number of strings
134 used by libld.so.2:
135
136 % cat libld.msg
137
138 # ident "%Z%%M% %I% %E% SMI"
139
140 @ _START_
141
142 # Message file for cmd/sgs/libld.
143
144 @ MSG_ID_LIBLD
145
146 # System call messages
147
148 @ MSG_SYS_OPEN "file %s: cannot open file: %s"
149 @ MSG_SYS_MMAP "file %s: cannot mmap file: %s"
150
151 # Symbol processing errors
152
153 @ MSG_SYM_DIFFTYPE "symbol `%s' has differing types:"
154 @ MSG_SYM_DIFFATTR "symbol `%s' has differing %s:\n\
155 \t(file %s value=0x%x; file %s value=0x%x);"
156
157 @ _END_
158
159 # The following strings represent reserved names. Reference to
258 int
259 main(int argc, char ** argv)
260 {
261 ......
262 (void) setlocale(LC_MESSAGES, MSG_ORIG(MSG_STR_EMPTY));
263 (void) textdomain(MSG_ORIG(MSG_SUNW_OST_SGS));
264 ......
265 }
266
267 const char *
268 _ld_msg(int mid)
269 {
270 return (gettext(MSG_ORIG(mid)));
271 }
272
273
274 EXIT STATUS
275 A non-zero error return indicates a processing error.
276
277 SEE ALSO
278 gencat(1), ld(1), msgfmt(1), catgets(3C), gettext(3I).
279
280
281
282 2 Jun 1999 sgsmsg(1l)
|
1 sgsmsg(1ONBLD) illumos Build Tools sgsmsg(1ONBLD)
2
3
4
5 NAME
6 sgsmsg - generate message strings for SGS subsystem.
7
8 SYNOPSIS
9 sgsmsg [ -cl ] [ -d data ] [ -h defs ] [ -i ident ]
10 [ -m messages ] [ -n name ] file ...
11
12 AVAILABILITY
13 SUNWonld
14
15 DESCRIPTION
16 sgsmsg generates several message files from an input string definition
17 file. sgsmsg provides a flexible, centralized, mechanism of collecting
18 character strings within a code group such as an executable or shared
19 object. All character strings are captured into a single data array
20 within the data file. The data array is similar to that produced by
21 xstr(1)), and helps reduce the relocation overhead incurred by string
118
119 The following ident file provides message identifiers for the link-
120 editor utilities ld(1), libld.so.2, and liblddbg.so.3. These
121 identifiers are referenced from the input string definition files of
122 the respective code groups:
123
124 % cat sgs.ident
125
126 # mesgid setiddomain
127
128 MSG_ID_LD 1 SUNW_OST_SGS
129 MSG_ID_LIBLD 2 SUNW_OST_SGS
130 MSG_ID_LIBLDDBG 3 SUNW_OST_SGS
131
132
133 The following string definition file defines a small number of strings
134 used by libld.so.2:
135
136 % cat libld.msg
137
138 @ _START_
139
140 # Message file for cmd/sgs/libld.
141
142 @ MSG_ID_LIBLD
143
144 # System call messages
145
146 @ MSG_SYS_OPEN "file %s: cannot open file: %s"
147 @ MSG_SYS_MMAP "file %s: cannot mmap file: %s"
148
149 # Symbol processing errors
150
151 @ MSG_SYM_DIFFTYPE "symbol `%s' has differing types:"
152 @ MSG_SYM_DIFFATTR "symbol `%s' has differing %s:\n\
153 \t(file %s value=0x%x; file %s value=0x%x);"
154
155 @ _END_
156
157 # The following strings represent reserved names. Reference to
256 int
257 main(int argc, char ** argv)
258 {
259 ......
260 (void) setlocale(LC_MESSAGES, MSG_ORIG(MSG_STR_EMPTY));
261 (void) textdomain(MSG_ORIG(MSG_SUNW_OST_SGS));
262 ......
263 }
264
265 const char *
266 _ld_msg(int mid)
267 {
268 return (gettext(MSG_ORIG(mid)));
269 }
270
271
272 EXIT STATUS
273 A non-zero error return indicates a processing error.
274
275 SEE ALSO
276 gencat(1), ld(1), msgfmt(1), catgets(3C), gettext(3C).
277
278
279
280 June 2, 1999 sgsmsg(1ONBLD)
|