diff options
| author | qiuyiuestc <[email protected]> | 2010-07-21 00:27:11 +0000 |
|---|---|---|
| committer | qiuyiuestc <[email protected]> | 2010-07-21 00:27:11 +0000 |
| commit | f834265044a0bcd6f0c7099de96e38e47324f28a (patch) | |
| tree | b4c283142fe2107e0f85a0a3ad0b134d9c0fbd70 /src/module.h | |
| parent | 5b0e4dc40a2fada0d8c0a5858723b3df80efc5d0 (diff) | |
reconstruct module
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@810 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/module.h')
| -rw-r--r-- | src/module.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/module.h b/src/module.h index 0db75da278..c28aae0bee 100644 --- a/src/module.h +++ b/src/module.h @@ -16,7 +16,7 @@ typedef rt_uint16_t Elf32_Half; /* Unsigned medium integer */ #define ELFMAG1 'E' /* e_ident[EI_MAG1] */
#define ELFMAG2 'L' /* e_ident[EI_MAG2] */
#define ELFMAG3 'F' /* e_ident[EI_MAG3] */
-#define ELFMAG "\177ELF" /* magic */
+#define RTMMAG "\177RTM" /* magic */
#define SELFMAG 4 /* size of magic */
#define EI_CLASS 4 /* file class */
@@ -154,13 +154,15 @@ typedef struct { /*
* Relocation type for arm
*/
-#define R_ARM_NONE 0
-#define R_ARM_PC24 1
-#define R_ARM_ABS32 2
-#define R_ARM_PLT32 27
-#define R_ARM_CALL 28
-#define R_ARM_JUMP24 29
-#define R_ARM_V4BX 40
+#define R_ARM_NONE 0
+#define R_ARM_PC24 1
+#define R_ARM_ABS32 2
+#define R_ARM_GLOB_DAT 21
+#define R_ARM_JUMP_SLOT 22
+#define R_ARM_PLT32 27
+#define R_ARM_CALL 28
+#define R_ARM_JUMP24 29
+#define R_ARM_V4BX 40
/* Program Header */
typedef struct {
@@ -174,6 +176,14 @@ typedef struct { Elf32_Word p_align; /* memory alignment */
} Elf32_Phdr;
+/* p_type */
+#define PT_LOAD 1
+
+/* p_flags */
+#define PF_X 1
+#define PF_W 2
+#define PF_R 4
+
/* sh_type */
#define SHT_NULL 0 /* inactive */
#define SHT_PROGBITS 1 /* program defined information */
@@ -200,9 +210,4 @@ typedef struct { #define SHF_MASKPROC 0xf0000000 /* reserved bits for processor */
/* specific section attributes */
-/* Symbol table index */
-#define STN_UNDEF 0 /* undefined */
-
-typedef rt_err_t (*elf_entry)( const void * env, struct rt_module_info **module_info);
-
#endif
|
