diff options
author | Cary Coutant <ccoutant@gmail.com> | 2015-12-11 14:01:22 -0800 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2015-12-11 14:23:58 -0800 |
commit | 6b2353a53a621680dc839366f4b2b4f96eccb6da (patch) | |
tree | a28e925b00e104787ffcb6d2945ac8076fb72020 /gold/object.h | |
parent | f1637ebed142eabd96cbc009edda8ec903c71fd6 (diff) | |
download | gdb-6b2353a53a621680dc839366f4b2b4f96eccb6da.zip gdb-6b2353a53a621680dc839366f4b2b4f96eccb6da.tar.gz gdb-6b2353a53a621680dc839366f4b2b4f96eccb6da.tar.bz2 |
Make output views accessible to Target during do_relocate().
gold/
* object.cc (Sized_relobj_file::Sized_relobj_file): Initialize
output_views_.
* object.h (Object::get_output_view): New function.
(Object::do_get_output_view): New function.
(Sized_relobj_file::do_get_output_view): New function.
(Sized_relobj_file::output_views_): New data member.
* reloc.cc: (Sized_relobj_file::do_relocate): Store pointer to
output views in class object.
(Sized_relobj_file::do_get_output_view): New function.
Diffstat (limited to 'gold/object.h')
-rw-r--r-- | gold/object.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gold/object.h b/gold/object.h index f408408..6cb82c7 100644 --- a/gold/object.h +++ b/gold/object.h @@ -844,6 +844,11 @@ class Object get_incremental_reloc_count(unsigned int symndx) const { return this->do_get_incremental_reloc_count(symndx); } + // Return the output view for section SHNDX. + const unsigned char* + get_output_view(unsigned int shndx, section_size_type* plen) const + { return this->do_get_output_view(shndx, plen); } + protected: // Returns NULL for Objects that are not dynamic objects. This method // is overridden in the Dynobj class. @@ -1029,6 +1034,11 @@ class Object do_get_incremental_reloc_count(unsigned int) const { gold_unreachable(); } + // Return the output view for a section. + virtual const unsigned char* + do_get_output_view(unsigned int, section_size_type*) const + { gold_unreachable(); } + void set_compressed_sections(Compressed_section_map* compressed_sections) { this->compressed_sections_ = compressed_sections; } @@ -2563,6 +2573,10 @@ class Sized_relobj_file : public Sized_relobj<size, big_endian> set_output_local_symbol_count(unsigned int value) { this->output_local_symbol_count_ = value; } + // Return the output view for a section. + const unsigned char* + do_get_output_view(unsigned int, section_size_type*) const; + private: // For convenience. typedef Sized_relobj_file<size, big_endian> This; @@ -2829,6 +2843,8 @@ class Sized_relobj_file : public Sized_relobj<size, big_endian> std::vector<Deferred_layout> deferred_layout_; // The list of relocation sections whose layout was deferred. std::vector<Deferred_layout> deferred_layout_relocs_; + // Pointer to the list of output views; valid only during do_relocate(). + const Views* output_views_; }; // A class to manage the list of all objects. |