10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1988 AT&T
24 * All Rights Reserved
25 *
26 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
27 */
28 /*
29 * Copyright (c) 2012, Joyent, Inc. All rights reserved.
30 */
31
32 /*
33 * Publicly available flags are defined in ld(1). The following flags are
34 * private, and may be removed at any time.
35 *
36 * OPTION MEANING
37 *
38 * -z dtrace=symbol assigns symbol to PT_SUNWDTRACE segment,
39 * providing scratch area for dtrace processing.
40 *
41 * -z noreloc suppress relocation processing. This provides
42 * a mechanism for validating kernel module symbol
43 * resolution that would normally incur fatal
44 * relocation errors.
45 *
46 * -z rtldinfo=symbol assigns symbol to SUNW_RTLDINF dynamic tag,
47 * providing pre-initialization specific routines
48 * for TLS initialization.
49 *
188 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZADLIB));
189 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZC));
190 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZDEF));
191 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZDFS));
192 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZDRS));
193 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZE));
194 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZFATW));
195 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZFA));
196 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZGP));
197 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZGUIDE));
198 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZH));
199 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZIG));
200 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZINA));
201 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZINI));
202 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZINT));
203 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZLAZY));
204 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZLD32));
205 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZLD64));
206 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZLO));
207 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZM));
208 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNC));
209 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNDFS));
210 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNDEF));
211 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNDEL));
212 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNDLO));
213 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNDU));
214 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNLD));
215 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNOW));
216 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNPA));
217 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNV));
218 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZO));
219 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZPIA));
220 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZRL));
221 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZRREL));
222 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZRS));
223 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZRSN));
224 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZRSGRP));
225 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZSCAP));
226 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZTARG));
227 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZT));
1308 * For other options simply set the ofl flags directly.
1309 */
1310 } else if (strcmp(optarg,
1311 MSG_ORIG(MSG_ARG_RESCAN)) == 0) {
1312 ofl->ofl_flags1 |= FLG_OF1_RESCAN;
1313 } else if (strcmp(optarg,
1314 MSG_ORIG(MSG_ARG_ABSEXEC)) == 0) {
1315 ofl->ofl_flags1 |= FLG_OF1_ABSEXEC;
1316 } else if (strcmp(optarg,
1317 MSG_ORIG(MSG_ARG_LOADFLTR)) == 0) {
1318 zlflag = TRUE;
1319 } else if (strcmp(optarg,
1320 MSG_ORIG(MSG_ARG_NORELOC)) == 0) {
1321 ofl->ofl_dtflags_1 |= DF_1_NORELOC;
1322 } else if (strcmp(optarg,
1323 MSG_ORIG(MSG_ARG_NOVERSION)) == 0) {
1324 ofl->ofl_flags |= FLG_OF_NOVERSEC;
1325 } else if (strcmp(optarg,
1326 MSG_ORIG(MSG_ARG_MULDEFS)) == 0) {
1327 ofl->ofl_flags |= FLG_OF_MULDEFS;
1328 } else if (strcmp(optarg,
1329 MSG_ORIG(MSG_ARG_REDLOCSYM)) == 0) {
1330 ofl->ofl_flags |= FLG_OF_REDLSYM;
1331 } else if (strcmp(optarg,
1332 MSG_ORIG(MSG_ARG_INITFIRST)) == 0) {
1333 ofl->ofl_dtflags_1 |= DF_1_INITFIRST;
1334 } else if (strcmp(optarg,
1335 MSG_ORIG(MSG_ARG_NODELETE)) == 0) {
1336 ofl->ofl_dtflags_1 |= DF_1_NODELETE;
1337 } else if (strcmp(optarg,
1338 MSG_ORIG(MSG_ARG_NOPARTIAL)) == 0) {
1339 ofl->ofl_flags1 |= FLG_OF1_NOPARTI;
1340 } else if (strcmp(optarg,
1341 MSG_ORIG(MSG_ARG_NOOPEN)) == 0) {
1342 ofl->ofl_dtflags_1 |= DF_1_NOOPEN;
1343 } else if (strcmp(optarg,
1344 MSG_ORIG(MSG_ARG_NOW)) == 0) {
1345 ofl->ofl_dtflags_1 |= DF_1_NOW;
1346 ofl->ofl_dtflags |= DF_BIND_NOW;
1347 } else if (strcmp(optarg,
|
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1988 AT&T
24 * All Rights Reserved
25 *
26 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
27 */
28 /*
29 * Copyright (c) 2012, Joyent, Inc. All rights reserved.
30 * Copyright 2016 RackTop Systems.
31 */
32
33 /*
34 * Publicly available flags are defined in ld(1). The following flags are
35 * private, and may be removed at any time.
36 *
37 * OPTION MEANING
38 *
39 * -z dtrace=symbol assigns symbol to PT_SUNWDTRACE segment,
40 * providing scratch area for dtrace processing.
41 *
42 * -z noreloc suppress relocation processing. This provides
43 * a mechanism for validating kernel module symbol
44 * resolution that would normally incur fatal
45 * relocation errors.
46 *
47 * -z rtldinfo=symbol assigns symbol to SUNW_RTLDINF dynamic tag,
48 * providing pre-initialization specific routines
49 * for TLS initialization.
50 *
189 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZADLIB));
190 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZC));
191 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZDEF));
192 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZDFS));
193 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZDRS));
194 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZE));
195 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZFATW));
196 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZFA));
197 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZGP));
198 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZGUIDE));
199 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZH));
200 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZIG));
201 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZINA));
202 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZINI));
203 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZINT));
204 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZLAZY));
205 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZLD32));
206 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZLD64));
207 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZLO));
208 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZM));
209 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZMI));
210 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNC));
211 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNDFS));
212 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNDEF));
213 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNDEL));
214 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNDLO));
215 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNDU));
216 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNLD));
217 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNOW));
218 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNPA));
219 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZNV));
220 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZO));
221 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZPIA));
222 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZRL));
223 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZRREL));
224 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZRS));
225 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZRSN));
226 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZRSGRP));
227 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZSCAP));
228 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZTARG));
229 (void) fprintf(stderr, MSG_INTL(MSG_ARG_DETAIL_ZT));
1310 * For other options simply set the ofl flags directly.
1311 */
1312 } else if (strcmp(optarg,
1313 MSG_ORIG(MSG_ARG_RESCAN)) == 0) {
1314 ofl->ofl_flags1 |= FLG_OF1_RESCAN;
1315 } else if (strcmp(optarg,
1316 MSG_ORIG(MSG_ARG_ABSEXEC)) == 0) {
1317 ofl->ofl_flags1 |= FLG_OF1_ABSEXEC;
1318 } else if (strcmp(optarg,
1319 MSG_ORIG(MSG_ARG_LOADFLTR)) == 0) {
1320 zlflag = TRUE;
1321 } else if (strcmp(optarg,
1322 MSG_ORIG(MSG_ARG_NORELOC)) == 0) {
1323 ofl->ofl_dtflags_1 |= DF_1_NORELOC;
1324 } else if (strcmp(optarg,
1325 MSG_ORIG(MSG_ARG_NOVERSION)) == 0) {
1326 ofl->ofl_flags |= FLG_OF_NOVERSEC;
1327 } else if (strcmp(optarg,
1328 MSG_ORIG(MSG_ARG_MULDEFS)) == 0) {
1329 ofl->ofl_flags |= FLG_OF_MULDEFS;
1330 } else if (strcmp(optarg,
1331 MSG_ORIG(MSG_ARG_MULINCL)) == 0) {
1332 ofl->ofl_flags |= FLG_OF_MULINCL;
1333 } else if (strcmp(optarg,
1334 MSG_ORIG(MSG_ARG_REDLOCSYM)) == 0) {
1335 ofl->ofl_flags |= FLG_OF_REDLSYM;
1336 } else if (strcmp(optarg,
1337 MSG_ORIG(MSG_ARG_INITFIRST)) == 0) {
1338 ofl->ofl_dtflags_1 |= DF_1_INITFIRST;
1339 } else if (strcmp(optarg,
1340 MSG_ORIG(MSG_ARG_NODELETE)) == 0) {
1341 ofl->ofl_dtflags_1 |= DF_1_NODELETE;
1342 } else if (strcmp(optarg,
1343 MSG_ORIG(MSG_ARG_NOPARTIAL)) == 0) {
1344 ofl->ofl_flags1 |= FLG_OF1_NOPARTI;
1345 } else if (strcmp(optarg,
1346 MSG_ORIG(MSG_ARG_NOOPEN)) == 0) {
1347 ofl->ofl_dtflags_1 |= DF_1_NOOPEN;
1348 } else if (strcmp(optarg,
1349 MSG_ORIG(MSG_ARG_NOW)) == 0) {
1350 ofl->ofl_dtflags_1 |= DF_1_NOW;
1351 ofl->ofl_dtflags |= DF_BIND_NOW;
1352 } else if (strcmp(optarg,
|