aboutsummaryrefslogtreecommitdiff
path: root/gold/dynobj.h
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-05-24 21:57:28 +0000
committerCary Coutant <ccoutant@google.com>2011-05-24 21:57:28 +0000
commit0f1c85a62235edfbe68c78b197dcdbbe94b0b160 (patch)
tree8354c13bf8f71048d9120527cac3493e9aafd0f3 /gold/dynobj.h
parent6fa2a40bf45fcc738eb580a6b644ac74b42c2d6a (diff)
downloadbinutils-0f1c85a62235edfbe68c78b197dcdbbe94b0b160.zip
binutils-0f1c85a62235edfbe68c78b197dcdbbe94b0b160.tar.gz
binutils-0f1c85a62235edfbe68c78b197dcdbbe94b0b160.tar.bz2
* dynobj.h (Dynobj::do_dynobj): New function.
* incremental-dump.cc (dump_incremental_inputs): Print as_needed flag and soname for shared objects. * incremental.cc (Incremental_inputs::report_object): Make either Incremental_object_entry or Incremental_dynobj_entry; add soname to string table. (Incremental_inputs::report_input_section): Add assertion. (Output_section_incremental_inputs::set_final_data_size): Adjust type of input file entry for shared libraries; adjust size of shared library info entry. (Output_section_incremental_inputs::write_input_files): Write as_needed flag for shared libraries. (Output_section_incremental_inputs::write_info_blocks): Adjust type of input file entry for shared libraries; write soname. (Sized_incr_dynobj::Sized_incr_dynobj): Read as_needed flag and soname from incremental info. * incremental.h (enum Incremental_input_flags): Add INCREMENTAL_INPUT_AS_NEEDED. (Incremental_input_entry::Incremental_input_entry): Initialize new data member. (Incremental_input_entry::set_as_needed): New function. (Incremental_input_entry::as_needed): New function. (Incremental_input_entry::do_dynobj_entry): New function. (Incremental_input_entry::as_needed_): New data member. (Incremental_object_entry::Incremental_object_entry): Don't check for shared library. (Incremental_object_entry::do_type): Likewise. (class Incremental_dynobj_entry): New class. (Incremental_input_entry_reader::as_needed): New function. (Incremental_input_entry_reader::get_soname): New function. (Incremental_input_entry_reader::get_global_symbol_count): Rewrite. (Incremental_input_entry_reader::get_output_symbol_index): Adjust size of shared library info entry. * layout.cc (Layout::finish_dynamic_section): Don't test for incremental link when adding DT_NEEDED entries. * object.h (Object::Object): Initialize new data member. (Object::dynobj): New function. (Object::set_as_needed): New function. (Object::as_needed): New function. (Object::do_dynobj): New function. (Object::as_needed_): New data member.
Diffstat (limited to 'gold/dynobj.h')
-rw-r--r--gold/dynobj.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gold/dynobj.h b/gold/dynobj.h
index c96ee2c..d26b8a7 100644
--- a/gold/dynobj.h
+++ b/gold/dynobj.h
@@ -96,6 +96,11 @@ class Dynobj : public Object
unsigned char** pphash, unsigned int* phashlen);
protected:
+ // Return a pointer to this object.
+ virtual Dynobj*
+ do_dynobj()
+ { return this; }
+
// Set the DT_SONAME string.
void
set_soname_string(const char* s)