diff --git a/.gitmodules b/.gitmodules
index 6f6a91b..e33db3e 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "dependencies/cli-parser"]
path = dependencies/cli-parser
url = https://githacks.org/_xeroxz/cli-parser.git
+[submodule "dependencies/linux-pe"]
+ path = dependencies/linux-pe
+ url = https://github.com/can1357/linux-pe.git
diff --git a/dependencies/linux-pe b/dependencies/linux-pe
new file mode 160000
index 0000000..db2b7af
--- /dev/null
+++ b/dependencies/linux-pe
@@ -0,0 +1 @@
+Subproject commit db2b7af6e6beae1bc391ff8f8e5c97b963dc3258
diff --git a/include/llodctor/llodctor_base.hpp b/include/llodctor/llodctor_base.hpp
index 9cb6ca8..1dc8277 100644
--- a/include/llodctor/llodctor_base.hpp
+++ b/include/llodctor/llodctor_base.hpp
@@ -12,6 +12,7 @@ namespace llo::s1
///
class dctor_base_t
{
+ protected:
///
/// vector of bytes containing the raw image to be deconstructed...
///
@@ -20,7 +21,7 @@ namespace llo::s1
///
/// symbol loader used when generating iff...
///
- llo::s1::symbol_loader_base_t* symbol_loader;
+ llo::s1::symbol_loader_base_t *symbol_loader;
public:
///
@@ -28,7 +29,7 @@ namespace llo::s1
///
/// vector of bytes containing the raw image...
explicit dctor_base_t( std::vector< std::uint8_t > &image,
- llo::s1::symbol_loader_base_t* symbol_loader = nullptr )
+ llo::s1::symbol_loader_base_t *symbol_loader = nullptr )
: raw_img{ image }, symbol_loader{ symbol_loader }
{
}
@@ -39,6 +40,6 @@ namespace llo::s1
///
///
///
- virtual bool generate( lloiff_t &iff ) = 0;
+ virtual void generate( lloiff_t &iff ) = 0;
};
} // namespace llo::s1
\ No newline at end of file
diff --git a/include/llodctor/llodctor_pe.hpp b/include/llodctor/llodctor_pe.hpp
index f58ee81..770fdd5 100644
--- a/include/llodctor/llodctor_pe.hpp
+++ b/include/llodctor/llodctor_pe.hpp
@@ -1,5 +1,6 @@
#pragma once
#include
+#include
namespace llo::s1
{
@@ -12,6 +13,6 @@ namespace llo::s1
{
}
- bool generate( lloiff_t &iff ) override;
+ void generate( lloiff_t &iff ) override;
};
} // namespace llo::s1
\ No newline at end of file
diff --git a/include/lloiff.hpp b/include/lloiff.hpp
index e500ad1..8e377e5 100644
--- a/include/lloiff.hpp
+++ b/include/lloiff.hpp
@@ -24,7 +24,7 @@ namespace llo
{
public:
llo::utils::hash_t< std::string > section_name;
- std::vector< llo::symbol::symbol_base_t > symbols;
+ std::vector< std::shared_ptr< llo::symbol::symbol_base_t > > symbols;
std::vector< std::uint8_t > section_raw;
};
diff --git a/include/llosymbol/llosymbol_base.hpp b/include/llosymbol/llosymbol_base.hpp
index 60cf30d..a62d250 100644
--- a/include/llosymbol/llosymbol_base.hpp
+++ b/include/llosymbol/llosymbol_base.hpp
@@ -31,7 +31,7 @@ namespace llo::symbol
{
}
- virtual symbol_type_t get_type() const;
- virtual std::size_t get_size() const;
+ virtual symbol_type_t get_type() const = 0;
+ virtual std::size_t get_size() const = 0;
};
} // namespace llo::symbol
\ No newline at end of file
diff --git a/include/llosymbol_loader/llosymbol_loader_base.hpp b/include/llosymbol_loader/llosymbol_loader_base.hpp
index 8ec0311..5020cc6 100644
--- a/include/llosymbol_loader/llosymbol_loader_base.hpp
+++ b/include/llosymbol_loader/llosymbol_loader_base.hpp
@@ -10,10 +10,16 @@ namespace llo::s1
class symbol_loader_base_t
{
std::string symbols_path;
+
public:
- symbol_loader_base_t( const std::string &&path ) : symbols_path{ path }
+ explicit symbol_loader_base_t( std::string &&path ) : symbols_path{ path }
{
}
- virtual void load( llo::lloiff_t && ) = 0;
+
+ symbol_loader_base_t( std::string &path ) : symbols_path{ path }
+ {
+ }
+
+ virtual void load( llo::lloiff_t &) = 0;
};
} // namespace llo::s1
\ No newline at end of file
diff --git a/include/llosymbol_loader/llosymbol_loader_map.cpp b/include/llosymbol_loader/llosymbol_loader_map.cpp
new file mode 100644
index 0000000..eeeaf48
--- /dev/null
+++ b/include/llosymbol_loader/llosymbol_loader_map.cpp
@@ -0,0 +1,5 @@
+#include
+
+void llo::s1::symbol_loader_map_t::load( llo::lloiff_t &iff )
+{
+}
\ No newline at end of file
diff --git a/include/llosymbol_loader/llosymbol_loader_map.hpp b/include/llosymbol_loader/llosymbol_loader_map.hpp
index e69de29..379c00a 100644
--- a/include/llosymbol_loader/llosymbol_loader_map.hpp
+++ b/include/llosymbol_loader/llosymbol_loader_map.hpp
@@ -0,0 +1,18 @@
+#include
+
+namespace llo::s1
+{
+ class symbol_loader_map_t : public symbol_loader_base_t
+ {
+ public:
+ explicit symbol_loader_map_t( std::string &&path ) : symbol_loader_base_t( path )
+ {
+ }
+
+ symbol_loader_map_t( std::string &path ) : symbol_loader_base_t( path )
+ {
+ }
+
+ void load( llo::lloiff_t &iff ) override;
+ };
+} // namespace llo::s1
\ No newline at end of file
diff --git a/include/lloutils.hpp b/include/lloutils.hpp
index 3375282..a75bbb5 100644
--- a/include/lloutils.hpp
+++ b/include/lloutils.hpp
@@ -1,7 +1,12 @@
#pragma once
+#include
#include
+#include
#include
+#include