1427 ofl->ofl_ars_gsandx = -1;
1428 }
1429
1430 /*
1431 * If -z wrap is seen, enter the symbol to be wrapped
1432 * into the wrap AVL tree.
1433 */
1434 } else if (strncmp(optarg, MSG_ORIG(MSG_ARG_WRAP),
1435 MSG_ARG_WRAP_SIZE) == 0) {
1436 if (ld_wrap_enter(ofl,
1437 optarg + MSG_ARG_WRAP_SIZE) == NULL)
1438 return (S_ERROR);
1439 } else if (strncmp(optarg, MSG_ORIG(MSG_ARG_ASLR),
1440 MSG_ARG_ASLR_SIZE) == 0) {
1441 char *p = optarg + MSG_ARG_ASLR_SIZE;
1442 if (*p == '\0') {
1443 ofl->ofl_aslr = 1;
1444 } else if (*p == '=') {
1445 p++;
1446
1447 if (strcmp(p,
1448 MSG_ORIG(MSG_ARG_ENABLED)) == 0) {
1449 ofl->ofl_aslr = 1;
1450 } else if (strcmp(p,
1451 MSG_ORIG(MSG_ARG_DISABLED)) == 0) {
1452 ofl->ofl_aslr = -1;
1453 } else {
1454 ld_eprintf(ofl, ERR_FATAL,
1455 MSG_INTL(MSG_ARG_ILLEGAL),
1456 MSG_ORIG(MSG_ARG_ZASLR), p);
1457 return (S_ERROR);
1458 }
1459 } else {
1460 ld_eprintf(ofl, ERR_FATAL,
1461 MSG_INTL(MSG_ARG_ILLEGAL),
1462 MSG_ORIG(MSG_ARG_Z), optarg);
1463 return (S_ERROR);
1464 }
1465 } else if ((strncmp(optarg, MSG_ORIG(MSG_ARG_GUIDE),
1466 MSG_ARG_GUIDE_SIZE) == 0) &&
1467 ((optarg[MSG_ARG_GUIDE_SIZE] == '=') ||
1468 (optarg[MSG_ARG_GUIDE_SIZE] == '\0'))) {
1469 if (!guidance_parse(ofl, optarg))
1470 return (S_ERROR);
1471 } else if (strcmp(optarg,
|
1427 ofl->ofl_ars_gsandx = -1;
1428 }
1429
1430 /*
1431 * If -z wrap is seen, enter the symbol to be wrapped
1432 * into the wrap AVL tree.
1433 */
1434 } else if (strncmp(optarg, MSG_ORIG(MSG_ARG_WRAP),
1435 MSG_ARG_WRAP_SIZE) == 0) {
1436 if (ld_wrap_enter(ofl,
1437 optarg + MSG_ARG_WRAP_SIZE) == NULL)
1438 return (S_ERROR);
1439 } else if (strncmp(optarg, MSG_ORIG(MSG_ARG_ASLR),
1440 MSG_ARG_ASLR_SIZE) == 0) {
1441 char *p = optarg + MSG_ARG_ASLR_SIZE;
1442 if (*p == '\0') {
1443 ofl->ofl_aslr = 1;
1444 } else if (*p == '=') {
1445 p++;
1446
1447 if ((strcmp(p,
1448 MSG_ORIG(MSG_ARG_ENABLED)) == 0) ||
1449 (strcmp(p,
1450 MSG_ORIG(MSG_ARG_ENABLE)) == 0)) {
1451 ofl->ofl_aslr = 1;
1452 } else if ((strcmp(p,
1453 MSG_ORIG(MSG_ARG_DISABLED)) == 0) ||
1454 (strcmp(p,
1455 MSG_ORIG(MSG_ARG_DISABLE)) == 0)) {
1456 ofl->ofl_aslr = -1;
1457 } else {
1458 ld_eprintf(ofl, ERR_FATAL,
1459 MSG_INTL(MSG_ARG_ILLEGAL),
1460 MSG_ORIG(MSG_ARG_ZASLR), p);
1461 return (S_ERROR);
1462 }
1463 } else {
1464 ld_eprintf(ofl, ERR_FATAL,
1465 MSG_INTL(MSG_ARG_ILLEGAL),
1466 MSG_ORIG(MSG_ARG_Z), optarg);
1467 return (S_ERROR);
1468 }
1469 } else if ((strncmp(optarg, MSG_ORIG(MSG_ARG_GUIDE),
1470 MSG_ARG_GUIDE_SIZE) == 0) &&
1471 ((optarg[MSG_ARG_GUIDE_SIZE] == '=') ||
1472 (optarg[MSG_ARG_GUIDE_SIZE] == '\0'))) {
1473 if (!guidance_parse(ofl, optarg))
1474 return (S_ERROR);
1475 } else if (strcmp(optarg,
|