aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/synth_elf.h
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-03-29 15:06:29 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-03-29 15:06:29 +0000
commit637c392d1c1ab10dd25426212674c771f65bb4bb (patch)
tree8bfb7020e4221e8044e6b5e234ba7183641dfe10 /src/common/linux/synth_elf.h
parentGet the complete linux gate mapping instead of only one page (diff)
downloadbreakpad-637c392d1c1ab10dd25426212674c771f65bb4bb.tar.xz
Defer adding sections until ELF::Finish in synth_elf
A=Mike Hommey <mh@glandium.org> R=ted at https://breakpad.appspot.com/543002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1135 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux/synth_elf.h')
-rw-r--r--src/common/linux/synth_elf.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/linux/synth_elf.h b/src/common/linux/synth_elf.h
index 1fbe749c..a2fb0dc0 100644
--- a/src/common/linux/synth_elf.h
+++ b/src/common/linux/synth_elf.h
@@ -39,6 +39,7 @@
#include "common/test_assembler.h"
#include <list>
+#include <vector>
#include <map>
#include <string>
#include <utility>
@@ -49,6 +50,7 @@ namespace google_breakpad {
namespace synth_elf {
using std::list;
+using std::vector;
using std::map;
using std::pair;
using test_assembler::Endianness;
@@ -128,6 +130,23 @@ class ELF : public Section {
Label section_header_string_index_;
// Section containing the names of section header table entries.
StringTable section_header_strings_;
+
+ // Record of an added section
+ struct ElfSection : public Section {
+ ElfSection(const Section& section, uint32_t type, uint32_t offset,
+ Label offset_label)
+ : Section(section), type_(type), offset_(offset)
+ , offset_label_(offset_label) {
+ }
+
+ uint32_t type_;
+ uint32_t offset_;
+ Label offset_label_;
+ };
+
+ vector<ElfSection> sections_;
+
+ void AppendSection(ElfSection &section);
};
// A class to build .symtab or .dynsym sections.