Print this page
7594 ld -zaslr should accept Solaris-compatible values

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/libld/common/args.c
          +++ new/usr/src/cmd/sgs/libld/common/args.c
↓ open down ↓ 1436 lines elided ↑ open up ↑
1437 1437                                      optarg + MSG_ARG_WRAP_SIZE) == NULL)
1438 1438                                          return (S_ERROR);
1439 1439                          } else if (strncmp(optarg, MSG_ORIG(MSG_ARG_ASLR),
1440 1440                              MSG_ARG_ASLR_SIZE) == 0) {
1441 1441                                  char *p = optarg + MSG_ARG_ASLR_SIZE;
1442 1442                                  if (*p == '\0') {
1443 1443                                          ofl->ofl_aslr = 1;
1444 1444                                  } else if (*p == '=') {
1445 1445                                          p++;
1446 1446  
1447      -                                        if (strcmp(p,
1448      -                                            MSG_ORIG(MSG_ARG_ENABLED)) == 0) {
     1447 +                                        if ((strcmp(p,
     1448 +                                            MSG_ORIG(MSG_ARG_ENABLED)) == 0) ||
     1449 +                                            (strcmp(p,
     1450 +                                            MSG_ORIG(MSG_ARG_ENABLE)) == 0)) {
1449 1451                                                  ofl->ofl_aslr = 1;
1450      -                                        } else if (strcmp(p,
1451      -                                            MSG_ORIG(MSG_ARG_DISABLED)) == 0) {
     1452 +                                        } else if ((strcmp(p,
     1453 +                                            MSG_ORIG(MSG_ARG_DISABLED)) == 0) ||
     1454 +                                            (strcmp(p,
     1455 +                                            MSG_ORIG(MSG_ARG_DISABLE)) == 0)) {
1452 1456                                                  ofl->ofl_aslr = -1;
1453 1457                                          } else {
1454 1458                                                  ld_eprintf(ofl, ERR_FATAL,
1455 1459                                                      MSG_INTL(MSG_ARG_ILLEGAL),
1456 1460                                                      MSG_ORIG(MSG_ARG_ZASLR), p);
1457 1461                                                  return (S_ERROR);
1458 1462                                          }
1459 1463                                  } else {
1460 1464                                          ld_eprintf(ofl, ERR_FATAL,
1461 1465                                              MSG_INTL(MSG_ARG_ILLEGAL),
↓ open down ↓ 709 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX