diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | elf.cpp | 1 | ||||
-rw-r--r-- | elf.h | 22 | ||||
-rw-r--r-- | test-elf.cpp | 34 |
4 files changed, 59 insertions, 0 deletions
@@ -54,6 +54,8 @@ SRC=\ test-lexer.cpp \ minicc.cpp \ test-minicc.cpp \ + elf.cpp \ + test-elf.cpp \ googletest/src/gtest-all.cpp \ googlemock/src/gmock-all.cpp @@ -0,0 +1 @@ +#include "elf.h" @@ -0,0 +1,22 @@ +#pragma once + +#pragma pack(push, 1) + +namespace Elf { + +// ELF 64 bit only + +struct FileHeader +{ +}; + +struct ProgramHeader +{ +}; + +struct SectionHeader +{ +}; + +} +#pragma pack(pop) diff --git a/test-elf.cpp b/test-elf.cpp new file mode 100644 index 0000000..d1aebd3 --- /dev/null +++ b/test-elf.cpp @@ -0,0 +1,34 @@ +#include "elf.h" +#include "minicc.h" + +#include <boost/algorithm/string.hpp> + +#include "gmock/gmock.h" +#include "gtest/gtest.h" + +#include <algorithm> +#include <cctype> +#include <deque> +#include <map> +#include <memory> +#include <string> +#include <utility> +#include <vector> + +using namespace std::string_literals; + +class ElfTest: public ::testing::Test +{ +protected: + ElfTest() { + //debug = true; + } + ~ElfTest() { + } +}; + +TEST_F(ElfTest, read) { +} + +TEST_F(ElfTest, write) { +} |