From fab9be40d6bb364713294f6f6c925ccc58bacb24 Mon Sep 17 00:00:00 2001 From: Richard Lowe Date: Fri, 18 Nov 2016 16:38:42 -0500 Subject: [PATCH] 7594 ld -zaslr should accept Solaris-compatible values Reviewed by: Robert Mustacchi Reviewed by: Toomas Soome Reviewed by: Gordon Ross Approved by: Dan McDonald --- usr/src/cmd/sgs/libld/common/args.c | 12 ++++++++---- usr/src/cmd/sgs/libld/common/libld.msg | 2 ++ usr/src/cmd/sgs/packages/common/SUNWonld-README | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/usr/src/cmd/sgs/libld/common/args.c b/usr/src/cmd/sgs/libld/common/args.c index 495fed322c..d130f4ecf3 100644 --- a/usr/src/cmd/sgs/libld/common/args.c +++ b/usr/src/cmd/sgs/libld/common/args.c @@ -1444,11 +1444,15 @@ parseopt_pass1(Ofl_desc *ofl, int argc, char **argv, int *usage) } else if (*p == '=') { p++; - if (strcmp(p, - MSG_ORIG(MSG_ARG_ENABLED)) == 0) { + if ((strcmp(p, + MSG_ORIG(MSG_ARG_ENABLED)) == 0) || + (strcmp(p, + MSG_ORIG(MSG_ARG_ENABLE)) == 0)) { ofl->ofl_aslr = 1; - } else if (strcmp(p, - MSG_ORIG(MSG_ARG_DISABLED)) == 0) { + } else if ((strcmp(p, + MSG_ORIG(MSG_ARG_DISABLED)) == 0) || + (strcmp(p, + MSG_ORIG(MSG_ARG_DISABLE)) == 0)) { ofl->ofl_aslr = -1; } else { ld_eprintf(ofl, ERR_FATAL, diff --git a/usr/src/cmd/sgs/libld/common/libld.msg b/usr/src/cmd/sgs/libld/common/libld.msg index dd77130b40..26c0e33054 100644 --- a/usr/src/cmd/sgs/libld/common/libld.msg +++ b/usr/src/cmd/sgs/libld/common/libld.msg @@ -1477,6 +1477,8 @@ @ MSG_ARG_ENABLED "enabled" @ MSG_ARG_DISABLED "disabled" +@ MSG_ARG_ENABLE "enable" +@ MSG_ARG_DISABLE "disable" # -z guidance=item strings @ MSG_ARG_GUIDE_DELIM ",: \t" diff --git a/usr/src/cmd/sgs/packages/common/SUNWonld-README b/usr/src/cmd/sgs/packages/common/SUNWonld-README index bc757a0aa4..0f3d5f67bd 100644 --- a/usr/src/cmd/sgs/packages/common/SUNWonld-README +++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README @@ -1659,3 +1659,4 @@ Bugid Risk Synopsis 6098 ld(1) should not require symbols which identify group sections be global 6252 ld should merge function/data-sections in the same manner as GNU ld 7323 ld(1) -zignore can erroneously discard init and fini arrays as unreferenced +7594 ld -zaslr should accept Solaris-compatible values -- 2.11.4.GIT