git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix clean all script for renamed armv7 arch
[tpg/acess2.git]
/
Kernel
/
include
/
binary.h
diff --git
a/Kernel/include/binary.h
b/Kernel/include/binary.h
index
91a2e22
..
a5ae974
100644
(file)
--- a/
Kernel/include/binary.h
+++ b/
Kernel/include/binary.h
@@
-8,35
+8,30
@@
// === TYPES ===
/**
// === TYPES ===
/**
- * \brief Representation of a
page
in a binary file
+ * \brief Representation of a
section
in a binary file
*
* Tells the binary loader where the page data resides on disk and where
* to load it to (relative to the binary base). Once the data is read,
* the \a Physical field contains the physical address of the page.
*/
*
* Tells the binary loader where the page data resides on disk and where
* to load it to (relative to the binary base). Once the data is read,
* the \a Physical field contains the physical address of the page.
*/
-typedef struct sBinary
Page
+typedef struct sBinary
Section
{
{
- /**
- * \brief Physical address, or file offset
- *
- * Physical address of this page or, when the file is not yet
- * loaded, this is a file offset (or -1 for uninitialised data)
- */
- tPAddr Physical;
+ Uint64 Offset;
tVAddr Virtual; //!< Virtual load address
tVAddr Virtual; //!< Virtual load address
- Uint16 Size; //!< Number of bytes to load from the file
- Uint16 Flags; //!< Load Flags
-} __attribute__ ((packed)) tBinaryPage;
+ size_t FileSize; //!< Number of bytes to load from the file
+ size_t MemSize; //!< Number of bytes in memory
+ Uint Flags; //!< Load Flags
+} tBinarySection;
/**
/**
- * \brief Flags for ::tBinary
Page
.Flags
- * \name Binary
Page
Flags
+ * \brief Flags for ::tBinary
Section
.Flags
+ * \name Binary
Section
Flags
* \{
*/
//! \brief Read-only
* \{
*/
//! \brief Read-only
-#define BIN_
PAGE
FLAG_RO 0x0001
+#define BIN_
SECT
FLAG_RO 0x0001
//! \brief Executable
//! \brief Executable
-#define BIN_
PAGE
FLAG_EXEC 0x0002
+#define BIN_
SECT
FLAG_EXEC 0x0002
/**
* \}
*/
/**
* \}
*/
@@
-60,12
+55,10
@@
typedef struct sBinaryPage
typedef struct sBinary
{
struct sBinary *Next; //!< Pointer used by the kernel
typedef struct sBinary
{
struct sBinary *Next; //!< Pointer used by the kernel
- /**
- * \brief True path of the file
- * \note Used to uniquely identify the loaded binary to reduce in-memory
- * duplication.
- */
- const char *TruePath;
+
+ tMount MountID;
+ tInode Inode;
+
/**
* \brief Interpreter used to load the file
* \note This can be either requested by the individual file, or a per-driver option
/**
* \brief Interpreter used to load the file
* \note This can be either requested by the individual file, or a per-driver option
@@
-74,24
+67,24
@@
typedef struct sBinary
/**
* \brief Entrypoint of the binary (at requested base);
*/
/**
* \brief Entrypoint of the binary (at requested base);
*/
-
Uint
Entry;
+
tVAddr
Entry;
/**
* \brief File's requested load base
*/
/**
* \brief File's requested load base
*/
-
Uint
Base;
+
tVAddr
Base;
/**
* \brief Number of times this binary has been mapped
*/
int ReferenceCount;
/**
/**
* \brief Number of times this binary has been mapped
*/
int ReferenceCount;
/**
- * \brief Number of
page
s defined in the file
+ * \brief Number of
section
s defined in the file
*/
*/
- int Num
Page
s;
+ int Num
Section
s;
/**
/**
- * \brief Array of
page
s defined by this binary
- * \note Contains \a Num
Page
s entries
+ * \brief Array of
section
s defined by this binary
+ * \note Contains \a Num
Section
s entries
*/
*/
- tBinary
Page Page
s[];
+ tBinary
Section LoadSection
s[];
} tBinary;
/**
} tBinary;
/**
UCC
git Repository :: git.ucc.asn.au