Changeset 9e5938dc in mainline
- Timestamp:
- 2006-03-05T13:30:31Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bc314be8
- Parents:
- bd21922
- Files:
-
- 7 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
rbd21922 r9e5938dc 122 122 generic/src/lib/sort.c \ 123 123 generic/src/lib/elf32.c \ 124 generic/src/lib/elf64.c \ 124 125 generic/src/debug/print.c \ 125 126 generic/src/debug/symtab.c \ -
arch/ia32/include/elf.h
rbd21922 r9e5938dc 32 32 #include <elf32.h> 33 33 34 #define CURRENT_ELF_MACHINE EM_386 35 #define CURRENT_ELF_DATA ELFDATA2LSB 34 #define ELF_MACHINE EM_386 35 #define ELF_DATA_ENCODING ELFDATA2LSB 36 #define ELF_CLASS ELFCLASS32 36 37 37 38 /* 38 39 * Main ELF loader function 39 40 */ 40 #defi ine elf_load(__address header, as_t *as)elf32_load(header, as)41 #define elf_load(header, as) elf32_load(header, as) 41 42 42 43 #endif -
generic/include/elf32.h
rbd21922 r9e5938dc 53 53 */ 54 54 #define EM_NO 0 // No machine 55 #define EM_M32 1 // AT&T WE 3210056 55 #define EM_SPARC 2 // SPARC 57 56 #define EM_386 3 // i386 58 #define EM_68K 4 // Motorola 6800059 #define EM_88K 5 // Motorola 8800060 #define EM_860 7 // i8086061 57 #define EM_MIPS 8 // MIPS RS3000 58 #define EM_MIPS_RS3_LE 10 // MIPS RS3000 LE 59 #define EM_PPC 20 // PPC32 60 #define EM_PPC64 21 // PPC64 61 #define EM_SPARCV9 43 // SPARC64 62 #define EM_IA_64 50 // IA-64 63 #define EM_X86_64 62 // AMD64/EMT64 62 64 63 65 /** -
generic/src/lib/elf32.c
rbd21922 r9e5938dc 27 27 */ 28 28 29 #include <elf 32.h>29 #include <elf.h> 30 30 31 31 /** 32bit ELF loader … … 36 36 */ 37 37 int elf32_load(__address header, as_t * as) { 38 return EE_UNSUPPORTED; 38 elf32_header_t * e_header; 39 40 e_header = (elf32_header_t *) header; 41 42 /* Identify ELF */ 43 if ( e_header->e_ident[EI_MAG0] != ELFMAG0 || e_header->e_ident[EI_MAG1] != ELFMAG1 || 44 e_header->e_ident[EI_MAG2] != ELFMAG2 || e_header->e_ident[EI_MAG3] != ELFMAG3 45 ) { 46 return EE_INVALID; 47 } 48 49 /* Identify ELF compatibility */ 50 if ( e_header->e_ident[EI_DATA] != ELF_DATA_ENCODING || e_header->e_machine != ELF_MACHINE || 51 e_header->e_ident[EI_VERSION] != EV_CURRENT || e_header->e_ident[EI_CLASS] != ELF_CLASS 52 ) { 53 return EE_UNSUPPORTED; 54 } 55 56 57 return EE_UNSUPPORTED; 39 58 }
Note:
See TracChangeset
for help on using the changeset viewer.