diff options
author | Alexander Eremin <a.eremin@nexenta.com> | 2014-11-06 17:32:39 +0400 |
---|---|---|
committer | Dan McDonald <danmcd@omniti.com> | 2014-11-06 11:18:33 -0500 |
commit | cffcfaee1e6b29ef9ceb7d80e4e053ffd029906b (patch) | |
tree | cd38c5a7f28fe1ff9263fd5826ae1a3261848ba9 | |
parent | 08eb19132eebba77347f1e2d5adac3f8d1e552ca (diff) | |
download | illumos-joyent-cffcfaee1e6b29ef9ceb7d80e4e053ffd029906b.tar.gz |
5270 ld(1) cannot handle CIE version 3 in .eh_frame
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Richard PALO <richard@netbsd.org>
Approved by: Dan McDonald <danmcd@omniti.com>
-rw-r--r-- | usr/src/cmd/sgs/libld/common/unwind.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/usr/src/cmd/sgs/libld/common/unwind.c b/usr/src/cmd/sgs/libld/common/unwind.c index 1e10b4664d..adaf253287 100644 --- a/usr/src/cmd/sgs/libld/common/unwind.c +++ b/usr/src/cmd/sgs/libld/common/unwind.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2014 Nexenta Systems, Inc. */ #include <string.h> @@ -409,15 +410,10 @@ ld_unwind_make_hdr(Ofl_desc *ofl) */ if (id == 0) { uint_t cieversion; - /* - * The only CIE version supported - * is '1' - quick sanity check - * here. - */ cieversion = data[off + ndx]; ndx += 1; /* BEGIN CSTYLED */ - if (cieversion != 1) { + if (cieversion != 1 && cieversion != 3) { ld_eprintf(ofl, ERR_FATAL, MSG_INTL(MSG_UNW_BADCIEVERS), isp->is_file->ifl_name, @@ -582,6 +578,7 @@ ld_unwind_populate_hdr(Ofl_desc *ofl) if (id == 0) { char *cieaugstr; uint_t cieaugndx; + uint_t cieversion; ciePflag = 0; cieRflag = 0; @@ -592,10 +589,8 @@ ld_unwind_populate_hdr(Ofl_desc *ofl) * are encoded. */ - /* - * burn through version - */ - ndx++; + cieversion = data[off + ndx]; + ndx += 1; /* * augstr @@ -612,8 +607,10 @@ ld_unwind_populate_hdr(Ofl_desc *ofl) /* * retreg */ - ndx++; - + if (cieversion == 1) + ndx++; + else + (void) uleb_extract(&data[off], &ndx); /* * we walk through the augmentation * section now looking for the Rflag |