diff options
author | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2009-11-25 00:10:05 +0000 |
---|---|---|
committer | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2009-11-25 00:10:05 +0000 |
commit | e2b8f3c4012cd3fe89ec3c272bc1b41b4aa3bbb0 (patch) | |
tree | 3a19bf9982fae1eefb37bc27f6a72b8dfa6d8760 /gold/incremental.cc | |
parent | db91f3f49f1e3fd4c5dfda4e0a6aa46053900729 (diff) | |
download | gdb-e2b8f3c4012cd3fe89ec3c272bc1b41b4aa3bbb0.zip gdb-e2b8f3c4012cd3fe89ec3c272bc1b41b4aa3bbb0.tar.gz gdb-e2b8f3c4012cd3fe89ec3c272bc1b41b4aa3bbb0.tar.bz2 |
2009-11-24 Rafael Avila de Espindola <espindola@google.com>
* Makefile.am: Build incremental-dump
* Makefile.in: Regenerate.
* incremental-dump.cc: New.
* incremental.cc (Incremental_inputs_header_data,
Incremental_inputs_entry_data): Move to incremental.h
* incremental.h: (Incremental_inputs_header_data,
Incremental_inputs_entry_data): Move from incremental.cc
2009-11-24 Rafael Avila de Espindola <espindola@google.com>
* elfcpp_file.h: Include elfcpp.h.
Diffstat (limited to 'gold/incremental.cc')
-rw-r--r-- | gold/incremental.cc | 59 |
1 files changed, 8 insertions, 51 deletions
diff --git a/gold/incremental.cc b/gold/incremental.cc index b5bfac5..97b3eea 100644 --- a/gold/incremental.cc +++ b/gold/incremental.cc @@ -39,59 +39,16 @@ namespace gold { // we could think about backward (and forward?) compatibility. const unsigned int INCREMENTAL_LINK_VERSION = 1; -namespace internal { - -// Header of the .gnu_incremental_input section. -struct Incremental_inputs_header_data -{ - // Incremental linker version. - elfcpp::Elf_Word version; - - // Numer of input files in the link. - elfcpp::Elf_Word input_file_count; - - // Offset of command line options in .gnu_incremental_strtab. - elfcpp::Elf_Word command_line_offset; - - // Padding. - elfcpp::Elf_Word reserved; -}; - -// Data stored in .gnu_incremental_input after the header for each of the -// Incremental_input_header_data::input_file_count input entries. -struct Incremental_inputs_entry_data -{ - // Offset of file name in .gnu_incremental_strtab section. - elfcpp::Elf_Word filename_offset; - - // Offset of data in .gnu_incremental_input. - elfcpp::Elf_Word data_offset; - - // Timestamp (in seconds). - elfcpp::Elf_Xword timestamp_sec; - - // Nano-second part of timestamp (if supported). - elfcpp::Elf_Word timestamp_nsec; - - // Type of the input entry. - elfcpp::Elf_Half input_type; - - // Padding. - elfcpp::Elf_Half reserved; -}; - -} - // Accessors. // Reader class for .gnu_incremental_inputs header. See -// internal::Incremental_inputs_header_data for fields descriptions. +// Incremental_inputs_header_data for fields descriptions. template<int size, bool big_endian> class Incremental_inputs_header { private: - typedef internal::Incremental_inputs_header_data Data_type; + typedef Incremental_inputs_header_data Data_type; public: Incremental_inputs_header(const unsigned char *p) @@ -121,13 +78,13 @@ class Incremental_inputs_header }; // Writer class for .gnu_incremental_inputs header. See -// internal::Incremental_inputs_header_data for fields descriptions. +// Incremental_inputs_header_data for fields descriptions. template<int size, bool big_endian> class Incremental_inputs_header_write { private: - typedef internal::Incremental_inputs_header_data Data_type; + typedef Incremental_inputs_header_data Data_type; public: Incremental_inputs_header_write(unsigned char *p) @@ -157,12 +114,12 @@ class Incremental_inputs_header_write }; // Reader class for an .gnu_incremental_inputs entry. See -// internal::Incremental_inputs_entry_data for fields descriptions. +// Incremental_inputs_entry_data for fields descriptions. template<int size, bool big_endian> class Incremental_inputs_entry { private: - typedef internal::Incremental_inputs_entry_data Data_type; + typedef Incremental_inputs_entry_data Data_type; public: Incremental_inputs_entry(const unsigned char *p) @@ -200,12 +157,12 @@ class Incremental_inputs_entry }; // Writer class for an .gnu_incremental_inputs entry. See -// internal::Incremental_inputs_entry_data for fields descriptions. +// Incremental_inputs_entry_data for fields descriptions. template<int size, bool big_endian> class Incremental_inputs_entry_write { private: - typedef internal::Incremental_inputs_entry_data Data_type; + typedef Incremental_inputs_entry_data Data_type; public: Incremental_inputs_entry_write(unsigned char *p) |