The eh_frame_ptr field in the .eh_frame_hdr section contains an address of the .eh_frame section. Using an absolute 32-bit format for encoding of this field does not work for 64-bit targets. It is better to use a relative format because it covers both 32-bit and 64-bit cases. Sure this work if a distance between .eh_frame_hdr and .eh_frame sections is less than 4 Gb. I think it is a rather correct assumption.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Current code fails if address of .eh_frame section is greater than 2^32 and does not fit into 4-byte. The alternative solution is to use DW_EH_PE_udata4 for 32-bit targets and DW_EH_PE_udata8 for 64-bit targets. But DW_EH_PE_pcrel covers both cases and it looks like gnu linkers use this format too.