aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2013-08-27 21:49:48 +0000
committerRoland McGrath <roland@gnu.org>2013-08-27 21:49:48 +0000
commiteb426534c3f150e77ebceba75facd2f49441d2fd (patch)
treeaaed32893651907607db05012db5d6b772d596de /gold/layout.h
parent69d751e3c12a127ed2313a94690081f9f813316c (diff)
downloadgdb-eb426534c3f150e77ebceba75facd2f49441d2fd.zip
gdb-eb426534c3f150e77ebceba75facd2f49441d2fd.tar.gz
gdb-eb426534c3f150e77ebceba75facd2f49441d2fd.tar.bz2
gold/
* output.cc (Output_segment::set_section_addresses): Take new Target* argument. If target->isolate_execinstr() and the segment is executable and starts at a target->abi_pagesize() boundary, pad its end out to a target->abi_pagesize() boundary with code fill. * output.h (Output_segment::set_section_addresses): Update decl. * layout.h (Layout::check_output_data_for_reset_values): Take new argument RELAX_OUTPUTS. (Layout): New member relax_output_list_. (Layout::add_relax_output): New method. * layout.cc (Layout::Layout): Update constructor. (Layout::reset_relax_output): New method. (Layout::clean_up_after_relaxation): Call it. (Layout::prepare_for_relaxation): Update caller. (Layout::set_segment_offsets): Update callers of set_section_addresses. Call reset_relax_output before re-processing segments for isolate_execinstr case. (Layout::write_data): Handle relax_output_list_. (Layout::Relaxation_debug_check::check_output_data_for_reset_values): Take new argument RELAX_OUTPUTS. Assert it's an empty collection.
Diffstat (limited to 'gold/layout.h')
-rw-r--r--gold/layout.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/gold/layout.h b/gold/layout.h
index 1743869..f49ae24 100644
--- a/gold/layout.h
+++ b/gold/layout.h
@@ -1,6 +1,6 @@
// layout.h -- lay out output file sections for gold -*- C++ -*-
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
// Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
@@ -897,7 +897,7 @@ class Layout
// they finish. Otherwise return BUILD_ID_BLOCKER.
Task_token*
queue_build_id_tasks(Workqueue* workqueue, Task_token* build_id_blocker,
- Output_file* of);
+ Output_file* of);
// Compute and write out the build ID if needed.
void
@@ -976,7 +976,17 @@ class Layout
// be mapped to an output section that should be KEPT.
bool
keep_input_section(const Relobj*, const char*);
-
+
+ // Add a special output object that will be recreated afresh
+ // if there is another relaxation iteration.
+ void
+ add_relax_output(Output_data* data)
+ { this->relax_output_list_.push_back(data); }
+
+ // Clear out (and free) everything added by add_relax_output.
+ void
+ reset_relax_output();
+
private:
Layout(const Layout&);
Layout& operator=(const Layout&);
@@ -1272,7 +1282,8 @@ class Layout
// Check that sections and special data are in reset states.
void
check_output_data_for_reset_values(const Layout::Section_list&,
- const Layout::Data_list&);
+ const Layout::Data_list& special_outputs,
+ const Layout::Data_list& relax_outputs);
// Record information of a section list.
void
@@ -1324,6 +1335,9 @@ class Layout
// The list of unattached Output_data objects which require special
// handling because they are not Output_sections.
Data_list special_output_list_;
+ // Like special_output_list_, but cleared and recreated on each
+ // iteration of relaxation.
+ Data_list relax_output_list_;
// The section headers.
Output_section_headers* section_headers_;
// A pointer to the PT_TLS segment if there is one.