diff options
author | Ian Lance Taylor <ian@airs.com> | 2011-07-02 00:03:25 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2011-07-02 00:03:25 +0000 |
commit | 02d7cd4495b617a9dc356b4f5140a74d020df6f5 (patch) | |
tree | 14729ef21007268b56536b188b055be2987a4ca3 /gold/target.h | |
parent | 3f26b7e8cb3d1e545a1461ded51f24259b1795e7 (diff) | |
download | gdb-02d7cd4495b617a9dc356b4f5140a74d020df6f5.zip gdb-02d7cd4495b617a9dc356b4f5140a74d020df6f5.tar.gz gdb-02d7cd4495b617a9dc356b4f5140a74d020df6f5.tar.bz2 |
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.
Diffstat (limited to 'gold/target.h')
-rw-r--r-- | gold/target.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/target.h b/gold/target.h index f9b8c04..c2ccc63 100644 --- a/gold/target.h +++ b/gold/target.h @@ -276,6 +276,15 @@ class Target section_may_have_icf_unsafe_pointers(const char* section_name) const { return this->do_section_may_have_icf_unsafe_pointers(section_name); } + // Return the base to use for the PC value in an FDE when it is + // encoded using DW_EH_PE_datarel. This does not appear to be + // documented anywhere, but it is target specific. Any use of + // DW_EH_PE_datarel in gcc requires defining a special macro + // (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX) to output the value. + uint64_t + ehframe_datarel_base() const + { return this->do_ehframe_datarel_base(); } + // Return true if a reference to SYM from a reloc of type R_TYPE // means that the current function may call an object compiled // without -fsplit-stack. SYM is known to be defined in an object @@ -521,6 +530,10 @@ class Target && !is_prefix_of(".eh_frame", section_name)); } + virtual uint64_t + do_ehframe_datarel_base() const + { gold_unreachable(); } + // Virtual function which may be overridden by the child class. The // default implementation is that any function not defined by the // ABI is a call to a non-split function. |