diff options
author | Cary Coutant <ccoutant@google.com> | 2012-10-23 21:34:58 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2012-10-23 21:34:58 +0000 |
commit | 9fc236f3fd33165d017dee94798ed08db95e87a0 (patch) | |
tree | 3e900dac1a0ab1fc3294dd61788603dab6c39ae0 /gold/object.h | |
parent | effe83657d4a26ab1f3132152dae212e54e66a04 (diff) | |
download | gdb-9fc236f3fd33165d017dee94798ed08db95e87a0.zip gdb-9fc236f3fd33165d017dee94798ed08db95e87a0.tar.gz gdb-9fc236f3fd33165d017dee94798ed08db95e87a0.tar.bz2 |
gold/
* dwarf_reader.cc (make_elf_reloc_mapper): Check size and endianness
from object, not parameters.
(Dwarf_info_reader::parse): Likewise.
* object.h (Relobj::elfsize, Relobj::is_big_endian): New methods.
(Relobj::do_elfsize, Relobj::do_is_big_endian): New methods.
(Sized_relobj::do_elfsize, Sized_relobj::do_is_big_endian): New
methods.
Diffstat (limited to 'gold/object.h')
-rw-r--r-- | gold/object.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gold/object.h b/gold/object.h index 522b63f..01c3c6f 100644 --- a/gold/object.h +++ b/gold/object.h @@ -1224,6 +1224,16 @@ class Relobj : public Object do_get_incremental_reloc_count(unsigned int symndx) const { return this->reloc_counts_[symndx]; } + // Return the word size of the object file. + int + elfsize() const + { return this->do_elfsize(); } + + // Return TRUE if this is a big-endian object file. + bool + is_big_endian() const + { return this->do_is_big_endian(); } + protected: // The output section to be used for each input section, indexed by // the input section number. The output section is NULL if the @@ -1386,6 +1396,16 @@ class Relobj : public Object return this->reloc_bases_[symndx] + counter; } + // Return the word size of the object file-- + // implemented by child class. + virtual int + do_elfsize() const = 0; + + // Return TRUE if this is a big-endian object file-- + // implemented by child class. + virtual bool + do_is_big_endian() const = 0; + private: // Mapping from input sections to output section. Output_sections output_sections_; @@ -1963,6 +1983,16 @@ class Sized_relobj : public Relobj } } + // Return the word size of the object file. + virtual int + do_elfsize() const + { return size; } + + // Return TRUE if this is a big-endian object file. + virtual bool + do_is_big_endian() const + { return big_endian; } + private: // The GOT offsets of local symbols. This map also stores GOT offsets // for tp-relative offsets for TLS symbols. |