Adopt module_defines to be compatible to the latest SetupPayload

This commit is contained in:
Maschell 2020-05-17 21:07:07 +02:00
parent b63723eb72
commit 192b00baae
3 changed files with 15 additions and 2 deletions

View File

@ -0,0 +1,10 @@
#pragma once
#include <cstdint>
#define EXPORT_MAXIMUM_NAME_LENGTH 50
typedef struct export_data_t {
uint32_t type;
char name[EXPORT_MAXIMUM_NAME_LENGTH];
uint32_t address = 0;
} export_data_t;

View File

@ -21,19 +21,23 @@
#include <stddef.h> #include <stddef.h>
#include "dynamic_linking_defines.h" #include "dynamic_linking_defines.h"
#include "relocation_defines.h" #include "relocation_defines.h"
#include "export_defines.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define MAXIMUM_MODULE_PATH_NAME_LENGTH 256 #define MAXIMUM_MODULE_PATH_NAME_LENGTH 256
#define MAXIMUM_MODULE_NAME_LENGTH 51 #define MAXIMUM_EXPORT_MODULE_NAME_LENGTH 51
#define DYN_LINK_RELOCATION_LIST_LENGTH 500 #define DYN_LINK_RELOCATION_LIST_LENGTH 500
#define EXPORT_ENTRY_LIST_LENGTH 100
struct module_information_single_t { struct module_information_single_t {
char path[MAXIMUM_MODULE_PATH_NAME_LENGTH] = ""; // Path where the module is stored char path[MAXIMUM_MODULE_PATH_NAME_LENGTH] = ""; // Path where the module is stored
dyn_linking_relocation_entry_t linking_entries[DYN_LINK_RELOCATION_LIST_LENGTH]; dyn_linking_relocation_entry_t linking_entries[DYN_LINK_RELOCATION_LIST_LENGTH];
char module_export_name[MAXIMUM_EXPORT_MODULE_NAME_LENGTH];
export_data_t export_entries[EXPORT_ENTRY_LIST_LENGTH];
int32_t priority; // Priority of this module int32_t priority; // Priority of this module
uint32_t bssAddr; uint32_t bssAddr;
uint32_t bssSize; uint32_t bssSize;

View File

@ -80,7 +80,6 @@ struct plugin_information_single_t {
plugin_info_t info; plugin_info_t info;
plugin_data_t data; plugin_data_t data;
int32_t priority; // Priority of this plugin int32_t priority; // Priority of this plugin
}; };
#define MAXIMUM_PLUGINS 32 #define MAXIMUM_PLUGINS 32