summaryrefslogtreecommitdiff
path: root/gold/layout.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-07-01 22:05:01 +0000
committerIan Lance Taylor <ian@airs.com>2011-07-01 22:05:01 +0000
commit07a60597350488f098508ee67717d549a8a0b579 (patch)
tree2476e48897011f57f41615892bdffda825fde6b2 /gold/layout.h
parenta931db6a07ac9ae2fec6c31c6d037716050292c5 (diff)
PR gold/12571
* options.h (class General_options): Add --ld-generated-unwind-info. * ehframe.cc (Fde::write): Add address parameter. Change all callers. If associated with PLT, fill in address and size. (Cie::set_output_offset): Only add merge mapping if there is an object. (Cie::write): Add address parameter. Change all callers. (Eh_frame::add_ehframe_for_plt): New function. * ehframe.h (class Fde): Update declarations. Move shndx_ and input_offset_ fields into union u_, with new plt field. (Fde::Fde): Adjust for new union field. (Fde::Fde) [Output_data version]: New constructor. (Fde::add_mapping): Only add merge mapping if there is an object. (class Cie): Update declarations. (class Eh_frame): Declare add_ehframe_for_plt. * layout.cc (Layout::layout_eh_frame): Break out code into make_eh_frame_section, and call it. (Layout::make_eh_frame_section): New function. (Layout::add_eh_frame_for_plt): New function. * layout.h (class Layout): Update declarations. * merge.cc (Merge_map::add_mapping): Add assertion. * i386.cc: Include "dwarf.h". (class Output_data_plt_i386): Make first_plt_entry, dyn_first_plt_entry, exec_plt_entry, and dyn_plt_entry const. Add plt_eh_frame_cie_size, plt_eh_frame_fde_size, plt_eh_frame_cie, and plt_eh_frame_fde. (Output_data_plt_i386::Output_data_plt_i386): Align to 16-byte boundary. Call add_eh_frame_for_plt if appropriate. * x86_64.cc: Include "dwarf.h". (class Output_data_plt_x86_64): Align to 16-byte boundary. Make first_plt_entry, plt_entry and tlsdesc_plt_entry const. Add plt_eh_frame_cie_size, plt_eh_frame_fde_size, plt_eh_frame_cie, and plt_eh_frame_fde. (Output_data_plt_x86_64::init): Call add_eh_frame_for_plt if appropriate.
Diffstat (limited to 'gold/layout.h')
-rw-r--r--gold/layout.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gold/layout.h b/gold/layout.h
index 4790584436..a16bb5ca6b 100644
--- a/gold/layout.h
+++ b/gold/layout.h
@@ -549,6 +549,14 @@ class Layout
unsigned int reloc_shndx, unsigned int reloc_type,
off_t* offset);
+ // Add .eh_frame information for a PLT. The FDE must start with a
+ // 4-byte PC-relative reference to the start of the PLT, followed by
+ // a 4-byte size of PLT.
+ void
+ add_eh_frame_for_plt(Output_data* plt, const unsigned char* cie_data,
+ size_t cie_length, const unsigned char* fde_data,
+ size_t fde_length);
+
// Handle a GNU stack note. This is called once per input object
// file. SEEN_GNU_STACK is true if the object file has a
// .note.GNU-stack section. GNU_STACK_FLAGS is the section flags
@@ -1018,6 +1026,10 @@ class Layout
void
attach_allocated_section_to_segment(Output_section*);
+ // Make the .eh_frame section.
+ Output_section*
+ make_eh_frame_section(const Relobj*);
+
// Set the final file offsets of all the segments.
off_t
set_segment_offsets(const Target*, Output_segment*, unsigned int* pshndx);