aboutsummaryrefslogtreecommitdiff
path: root/gold/target.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-02-27 23:11:56 +0000
committerAlan Modra <amodra@gmail.com>2013-02-27 23:11:56 +0000
commit9d5781f8a245086dcdd3cd8fcddcd5b19c3a1e49 (patch)
treee53d7aa78570b4f92a31db6d49bb0e0a31374b61 /gold/target.h
parent71091f23fd90c0f1d04a0471ec561f07120b702c (diff)
downloadgdb-9d5781f8a245086dcdd3cd8fcddcd5b19c3a1e49.zip
gdb-9d5781f8a245086dcdd3cd8fcddcd5b19c3a1e49.tar.gz
gdb-9d5781f8a245086dcdd3cd8fcddcd5b19c3a1e49.tar.bz2
* target.h (Target::plt_fde_location, do_plt_fde_location): Declare.
* target.cc (Target::do_plt_fde_location): New function. * ehframe.h (class FDE): Add post_map field to u_.from_linker, accessor function, and constructor param. (struct Post_fde, Post_fdes): Declare. (Cie::write): Add post_fdes param. * ehframe.cc (Fde::write): Use plt_fde_location. (struct Post_fde): Define. (Cie::write): Stash FDEs added post merge mapping. (Eh_frame::add_ehframe_for_plt): Assert no new CIEs after mapping. Adjust Fde constructor call. Bump final_data_size_ for post map FDEs. (Eh_frame::do_sized_write): Arrange to write post map FDES after other FDEs. * powerpc.cc (Target_powerpc::do_plt_fde_location): New function. (Target_powerpc::has_glink): New function. (Target_powerpc::do_relax): Add eh_frame info for stubs. (struct Eh_cie, eh_frame_cie, glink_eh_frame_fde_64, glink_eh_frame_fde_32, default_fde): New data. (Stub_table::eh_frame_added_): New var. (Stub_table::find_long_branch_entry, stub_address, stub_offset): Make const. (Stub_table::add_eh_frame): New function. (Output_data_glink::add_eh_frame): New function. (Target_powerpc::make_glink_section): Call add_eh_frame.
Diffstat (limited to 'gold/target.h')
-rw-r--r--gold/target.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gold/target.h b/gold/target.h
index d4b9d0f..d75711e 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -240,6 +240,12 @@ class Target
adjust_elf_header(unsigned char* view, int len) const
{ return this->do_adjust_elf_header(view, len); }
+ // Return address and size to plug into eh_frame FDEs associated with a PLT.
+ void
+ plt_fde_location(const Output_data* plt, unsigned char* oview,
+ uint64_t* address, off_t* len) const
+ { return this->do_plt_fde_location(plt, oview, address, len); }
+
// Return whether NAME is a local label name. This is used to implement the
// --discard-locals options.
bool
@@ -530,6 +536,11 @@ class Target
virtual void
do_adjust_elf_header(unsigned char*, int) const = 0;
+ // Return address and size to plug into eh_frame FDEs associated with a PLT.
+ virtual void
+ do_plt_fde_location(const Output_data* plt, unsigned char* oview,
+ uint64_t* address, off_t* len) const;
+
// Virtual function which may be overridden by the child class.
virtual bool
do_is_local_label_name(const char*) const;