aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/source/elfload.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/source/elfload.hpp')
-rw-r--r--firmware/source/elfload.hpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/firmware/source/elfload.hpp b/firmware/source/elfload.hpp
index 10d95d7..9cfcbf9 100644
--- a/firmware/source/elfload.hpp
+++ b/firmware/source/elfload.hpp
@@ -2,7 +2,7 @@
* @file elfload.hpp
* @brief Loads ELF binary data into memory for execution.
*
- * Copyright (C) 2021 Clyne Sullivan
+ * Copyright (C) 2023 Clyne Sullivan
*
* Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program.
@@ -24,9 +24,26 @@ class ELFManager
public:
using EntryFunc = Sample *(*)(Sample *, size_t);
+ /**
+ * Attempts to parse the ELF binary loaded in the file buffer.
+ * Returns true if successful.
+ */
static bool loadFromInternalBuffer();
+
+ /**
+ * Returns a function pointer to the loaded ELF's entry point.
+ * Returns nullptr if a valid ELF is not loaded.
+ */
static EntryFunc loadedElf();
+
+ /**
+ * Returns the address of the ELF file buffer (copy ELF binary to here).
+ */
static unsigned char *fileBuffer();
+
+ /**
+ * "Unloads" the loaded binary by invalidating the entry pointer.
+ */
static void unload();
private: