aboutsummaryrefslogtreecommitdiff
path: root/gold/target.h
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2010-11-09 07:56:10 +0000
committerDoug Kwan <dougkwan@google.com>2010-11-09 07:56:10 +0000
commitf625ae503e5bf88c2f5d6b5a34316416f1fd0f9b (patch)
treee3359bbf3c6e38ae35fccbcec1c8561a4af7a97a /gold/target.h
parentefd11a33a137b2c48728539f9d695fc1bea6fb40 (diff)
downloadgdb-f625ae503e5bf88c2f5d6b5a34316416f1fd0f9b.zip
gdb-f625ae503e5bf88c2f5d6b5a34316416f1fd0f9b.tar.gz
gdb-f625ae503e5bf88c2f5d6b5a34316416f1fd0f9b.tar.bz2
2010-11-08 Doug Kwan <dougkwan@google.com>
Cary Coutant <ccoutant@google.com> * arm.cc (Arm_exidx_merge_section::build_contents): New method. (Arm_exidx_merge_section::section_contents_): New data member. (Arm_input_section::Arm_input_section): Initialize original_contents_. (Arm_input_section::~Arm_input_section): De-allocate memory. (Arm_input_section::original_contents_): New data member. (Arm_exidx_fixup::process_exidx_section): Pass EXIDX section contents in parameters instead of calling Object::section_contents without locking. (Arm_output_section::group_section): New parameter TASK. Pass it to callees that need locking objects. (Arm_output_section::fix_exidx_coverage): New parameter TASK. Use it to lock EXIDX input sections. Fix a formatting issue. Call Arm_exidx_merged_section::build_contents to create merged section contents. (Arm_output_section::create_stub_group): New parameter TASK. Use it to lock object of stub table owner. (Arm_exidx_input_section::Arm_exidx_input_section): Add new parameter TEXT_SIZE to initialize data member TEXT_SIZE_. (Arm_exidx_input_section::addralign): Fix typo in comment. (Arm_exidx_input_section::text_size): New method. (Target_arm::do_relax): New parameter TASK. Pass it to callees that require locking objects. Lock objects before scanning for stubs and updating local symbols. (Arm_input_section<big_endian>::init): Copy contents of original input section. (Arm_input_section<big_endian>::do_write): Use saved contents of original input section instead of calling Object::section_contents without locking. (Arm_exidx_cantunwind::do_fixed_endian_write): Find out text section size without calling Object::section_size(). (Arm_exidx_merged_section::Arm_exidx_merged_section): Add sanity check for size. Allocate a buffer for merged EXIDX entries. (Arm_exidx_merged_section::build_contents): New method. (Arm_exidx_merged_section::do_write): Move merge section contents building code to Arm_exidx_merged_section::build_contetns. Write out contetns in buffer instead of building it on the fly. (Arm_relobj::make_exidx_input_section): Also pass text section size to Arm_exidx_input_section constructor. (Arm_relobj::do_read_symbols): Fix memory leak. Fix a formatting issue. (Arm_dynobj::do_read_symbols): Fix memory leak. * layout.cc (Layout::finalize): Pass TASK to Target::relax(). * target.h: (class Task): Add forward declaration. (Target::relax): Add new parameter TASK and pass it to Target::do_relax(). (Target::do_relax):: New parameter TASK. Fix a formatting issue.
Diffstat (limited to 'gold/target.h')
-rw-r--r--gold/target.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gold/target.h b/gold/target.h
index 5cdd032..aa8ebea 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -56,6 +56,7 @@ class Symbol_table;
class Output_data;
class Output_section;
class Input_objects;
+class Task;
// The abstract class for target specific handling.
@@ -332,13 +333,13 @@ class Target
// Perform a relaxation pass. Return true if layout may be changed.
bool
relax(int pass, const Input_objects* input_objects, Symbol_table* symtab,
- Layout* layout)
+ Layout* layout, const Task* task)
{
// Run the dummy relaxation pass twice if relaxation debugging is enabled.
if (is_debugging_enabled(DEBUG_RELAXATION))
return pass < 2;
- return this->do_relax(pass, input_objects, symtab, layout);
+ return this->do_relax(pass, input_objects, symtab, layout, task);
}
// Return the target-specific name of attributes section. This is
@@ -555,7 +556,7 @@ class Target
// Virtual function which may be overriden by the child class.
virtual bool
- do_relax(int, const Input_objects*, Symbol_table*, Layout*)
+ do_relax(int, const Input_objects*, Symbol_table*, Layout*, const Task*)
{ return false; }
// A function for targets to call. Return whether BYTES/LEN matches