gold patch committed: Handle DW_EH_PE_datarel in FDE

Ian Lance Taylor iant@google.com
Sat Jul 2 00:07:00 GMT 2011


This gold patch adds support for DW_EH_PE_datarel entries in an FDE.
gold needs to know how to handle them in order to support generating the
.eh_frame_hdr section correctly.  gcc will generate DW_EH_PE_datarel on
Solaris and SVR4, because the native assemblers allegedly can not handle
an expression representing the difference between two symbols in
different sections.  For DW_EH_PE_datarel the base of the value will be
the global offset table, meaning that gcc can simply use a GOTOFF
relocation.  Committed to mainline.

Ian


2011-07-01  Ian Lance Taylor  <iant@google.com>

	PR gold/12525
	* ehframe.cc (Eh_frame_hdr::get_fde_pc): Handle DW_EH_PE_datarel.
	Assert if we see DW_EH_PE_indirect.
	* target.h (Target::ehframe_datarel_base): New function.
	(Target::do_ehframe_datarel_base): New target function.
	* i386.cc (Target_i386::do_ehframe_datarel_base): New function.
	* x86_64.cc (Target_x86_64::do_ehframe_datarel_base): New
	function.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 5358 bytes
Desc: patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20110702/07636d78/attachment.bin>


More information about the Binutils mailing list