diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-09-08 11:50:48 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-09-08 11:50:48 +0000 |
commit | 534dc7d0799b42fdf8f79ea437ae1c9a8783bc0b (patch) | |
tree | 3d4c9017bf1ece4a75f69d669b3b8aca918d041f | |
parent | 3bcafc09fab076aba91ad89b8f2d7e2283aeb6f1 (diff) | |
parent | 202ca9ae460faf1825ede303c46abd4e1f6cee28 (diff) | |
download | illumos-joyent-534dc7d0799b42fdf8f79ea437ae1c9a8783bc0b.tar.gz |
[illumos-gate merge]
commit 202ca9ae460faf1825ede303c46abd4e1f6cee28
8616 ld has trouble parsing -z options specified with -Wl
-rw-r--r-- | usr/src/cmd/sgs/libld/common/args.c | 9 | ||||
-rw-r--r-- | usr/src/cmd/sgs/libld/common/libld.msg | 2 | ||||
-rw-r--r-- | usr/src/cmd/sgs/packages/common/SUNWonld-README | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/usr/src/cmd/sgs/libld/common/args.c b/usr/src/cmd/sgs/libld/common/args.c index d130f4ecf3..c737ea9065 100644 --- a/usr/src/cmd/sgs/libld/common/args.c +++ b/usr/src/cmd/sgs/libld/common/args.c @@ -27,6 +27,7 @@ */ /* * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright 2017 RackTop Systems. */ /* @@ -1237,6 +1238,14 @@ parseopt_pass1(Ofl_desc *ofl, int argc, char **argv, int *usage) DBG_CALL(Dbg_args_option(ofl->ofl_lml, ndx, c, optarg)); /* + * Skip comma that might be present between -z and its + * argument (e.g. if -Wl,-z,assert-deflib was passed). + */ + if (strncmp(optarg, MSG_ORIG(MSG_STR_COMMA), + MSG_STR_COMMA_SIZE) == 0) + optarg++; + + /* * For specific help, print our usage message and exit * immediately to ensure a 0 return code. */ diff --git a/usr/src/cmd/sgs/libld/common/libld.msg b/usr/src/cmd/sgs/libld/common/libld.msg index 26c0e33054..45a90b0e82 100644 --- a/usr/src/cmd/sgs/libld/common/libld.msg +++ b/usr/src/cmd/sgs/libld/common/libld.msg @@ -25,6 +25,7 @@ # # Copyright (c) 2012, Joyent, Inc. All rights reserved. +# Copyright 2017 RackTop Systems. # @ _START_ @@ -730,6 +731,7 @@ @ MSG_QSTR_STAR "'*'" @ MSG_STR_DOT "." @ MSG_STR_SLASH "/" +@ MSG_STR_COMMA "," @ MSG_STR_DYNAMIC "(.dynamic)" @ MSG_STR_ORIGIN "$ORIGIN" @ MSG_STR_MACHINE "$MACHINE" diff --git a/usr/src/cmd/sgs/packages/common/SUNWonld-README b/usr/src/cmd/sgs/packages/common/SUNWonld-README index 0f3d5f67bd..b895773d15 100644 --- a/usr/src/cmd/sgs/packages/common/SUNWonld-README +++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README @@ -1660,3 +1660,4 @@ Bugid Risk Synopsis 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 +8616 ld has trouble parsing -z options specified with -Wl |