Print this page
3265 link-editor builds bogus .eh_frame_hdr on ia32
*** 637,648 ****
* field.
*/
(void) dwarf_ehe_extract(
&data[off + ndx],
&ndx, ciePflag,
! ofl->ofl_dehdr->e_ident,
! shdr->sh_addr, off + ndx);
break;
case 'R':
/* code encoding */
cieRflag = data[off + ndx];
ndx++;
--- 637,648 ----
* field.
*/
(void) dwarf_ehe_extract(
&data[off + ndx],
&ndx, ciePflag,
! ofl->ofl_dehdr->e_ident, B_FALSE,
! shdr->sh_addr, off + ndx, 0);
break;
case 'R':
/* code encoding */
cieRflag = data[off + ndx];
ndx++;
*** 656,669 ****
}
} else {
uint_t bintabndx;
uint64_t initloc;
uint64_t fdeaddr;
initloc = dwarf_ehe_extract(&data[off],
&ndx, cieRflag, ofl->ofl_dehdr->e_ident,
! shdr->sh_addr, off + ndx);
/*
* Ignore FDEs with initloc set to 0.
* initloc will not be 0 unless this FDE was
* abandoned due to GNU linkonce processing.
--- 656,676 ----
}
} else {
uint_t bintabndx;
uint64_t initloc;
uint64_t fdeaddr;
+ uint64_t gotaddr = 0;
+
+ if (ofl->ofl_osgot != NULL)
+ gotaddr =
+ ofl->ofl_osgot->os_shdr->sh_addr;
initloc = dwarf_ehe_extract(&data[off],
&ndx, cieRflag, ofl->ofl_dehdr->e_ident,
! B_FALSE,
! shdr->sh_addr, off + ndx,
! gotaddr);
/*
* Ignore FDEs with initloc set to 0.
* initloc will not be 0 unless this FDE was
* abandoned due to GNU linkonce processing.