aboutsummaryrefslogtreecommitdiff
path: root/gold/object.h
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2009-10-25 16:57:32 +0000
committerDoug Kwan <dougkwan@google.com>2009-10-25 16:57:32 +0000
commit72adc4fad75cca8235786832069b26e7ae3ba5cf (patch)
treec6a5bd480d91660b831dda2eaa67588a51c6d5ad /gold/object.h
parenta39571ad49620595c2e9baf5b477c78eb7a22982 (diff)
downloadgdb-72adc4fad75cca8235786832069b26e7ae3ba5cf.zip
gdb-72adc4fad75cca8235786832069b26e7ae3ba5cf.tar.gz
gdb-72adc4fad75cca8235786832069b26e7ae3ba5cf.tar.bz2
2009-10-25 Doug Kwan <dougkwan@google.com>
* arm.cc (Arm_output_section, Arm_relobj): Forward class declarations. (Arm_input_section::as_arm_input_section): New method. (Arm_output_section): New class definition. (Arm_output_section::create_stub_group, Arm_output_section::group_sections): New method definitions.
Diffstat (limited to 'gold/object.h')
-rw-r--r--gold/object.h38
1 files changed, 23 insertions, 15 deletions
diff --git a/gold/object.h b/gold/object.h
index ff96682..0d40397 100644
--- a/gold/object.h
+++ b/gold/object.h
@@ -1648,6 +1648,25 @@ class Sized_relobj : public Relobj
local_values()
{ return &this->local_values_; }
+ // Views and sizes when relocating.
+ struct View_size
+ {
+ unsigned char* view;
+ typename elfcpp::Elf_types<size>::Elf_Addr address;
+ off_t offset;
+ section_size_type view_size;
+ bool is_input_output_view;
+ bool is_postprocessing_view;
+ };
+
+ typedef std::vector<View_size> Views;
+
+ // This may be overriden by a child class.
+ virtual void
+ do_relocate_sections(const General_options& options,
+ const Symbol_table* symtab, const Layout* layout,
+ const unsigned char* pshdrs, Views* pviews);
+
private:
// For convenience.
typedef Sized_relobj<size, big_endian> This;
@@ -1702,19 +1721,6 @@ class Sized_relobj : public Relobj
typename This::Shdr& shdr, unsigned int reloc_shndx,
unsigned int reloc_type);
- // Views and sizes when relocating.
- struct View_size
- {
- unsigned char* view;
- typename elfcpp::Elf_types<size>::Elf_Addr address;
- off_t offset;
- section_size_type view_size;
- bool is_input_output_view;
- bool is_postprocessing_view;
- };
-
- typedef std::vector<View_size> Views;
-
// Write section data to the output file. Record the views and
// sizes in VIEWS for use when relocating.
void
@@ -1722,8 +1728,10 @@ class Sized_relobj : public Relobj
// Relocate the sections in the output file.
void
- relocate_sections(const General_options& options, const Symbol_table*,
- const Layout*, const unsigned char* pshdrs, Views*);
+ relocate_sections(const General_options& options, const Symbol_table* symtab,
+ const Layout* layout, const unsigned char* pshdrs,
+ Views* pviews)
+ { this->do_relocate_sections(options, symtab, layout, pshdrs, pviews); }
// Scan the input relocations for --emit-relocs.
void