Print this page
5270 ld(1) cannot handle CIE version 3 in .eh_frame

*** 19,28 **** --- 19,29 ---- * CDDL HEADER END */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2014 Nexenta Systems, Inc. */ #include <string.h> #include <stdio.h> #include <sys/types.h>
*** 407,425 **** * this is a FDE entry and the 'id' is the * CIE pointer. */ 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) { ld_eprintf(ofl, ERR_FATAL, MSG_INTL(MSG_UNW_BADCIEVERS), isp->is_file->ifl_name, isp->is_name, off); return (S_ERROR); --- 408,421 ---- * this is a FDE entry and the 'id' is the * CIE pointer. */ if (id == 0) { uint_t cieversion; cieversion = data[off + ndx]; ndx += 1; /* BEGIN CSTYLED */ ! if (cieversion != 1 && cieversion != 3) { ld_eprintf(ofl, ERR_FATAL, MSG_INTL(MSG_UNW_BADCIEVERS), isp->is_file->ifl_name, isp->is_name, off); return (S_ERROR);
*** 580,589 **** --- 576,586 ---- * CIE pointer. */ if (id == 0) { char *cieaugstr; uint_t cieaugndx; + uint_t cieversion; ciePflag = 0; cieRflag = 0; /* * We need to drill through the CIE
*** 590,603 **** * to find the Rflag. It's the Rflag * which describes how the FDE code-pointers * are encoded. */ ! /* ! * burn through version ! */ ! ndx++; /* * augstr */ cieaugstr = (char *)(&data[off + ndx]); --- 587,598 ---- * to find the Rflag. It's the Rflag * which describes how the FDE code-pointers * are encoded. */ ! cieversion = data[off + ndx]; ! ndx += 1; /* * augstr */ cieaugstr = (char *)(&data[off + ndx]);
*** 610,621 **** (void) sleb_extract(&data[off], &ndx); /* * retreg */ ndx++; ! /* * we walk through the augmentation * section now looking for the Rflag */ for (cieaugndx = 0; cieaugstr[cieaugndx]; --- 605,618 ---- (void) sleb_extract(&data[off], &ndx); /* * retreg */ + if (cieversion == 1) ndx++; ! else ! (void) uleb_extract(&data[off], &ndx); /* * we walk through the augmentation * section now looking for the Rflag */ for (cieaugndx = 0; cieaugstr[cieaugndx];