* Add/update linker & loader error codes.

This commit is contained in:
bg- 2007-04-26 12:54:13 +00:00
parent e82fc60702
commit a71b149e29
2 changed files with 17 additions and 13 deletions

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)$Id: cmod.h,v 1.2 2007/04/25 15:38:00 bg- Exp $ * @(#)$Id: cmod.h,v 1.3 2007/04/26 12:54:13 bg- Exp $
*/ */
#ifndef CMOD_H #ifndef CMOD_H
@ -49,8 +49,8 @@ cmod_load(unsigned imod,
void cmod_unload(int imod); void cmod_unload(int imod);
/* Most error codes are chared with elfloader and cle. */ /* Most error codes are chared with elfloader and cle. */
#define CMOD_OK 0 #define CMOD_OK CLE_OK
#define CMOD_NO_STARTPOINT 7 #define CMOD_NO_STARTPOINT CLE_NO_STARTPOINT
#define CMOD_DATA_TO_LARGE 9 #define CMOD_DATA_TO_LARGE CLE_DATA_TO_LARGE
#endif /* CMOD_H */ #endif /* CMOD_H */

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* @(#)$Id: codeprop.c,v 1.3 2007/03/18 13:15:00 ksb Exp $ * @(#)$Id: codeprop.c,v 1.4 2007/04/26 12:56:28 bg- Exp $
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@ -107,14 +107,18 @@ main(int argc, char **argv) {
printf("Reply: %s", buf); printf("Reply: %s", buf);
if(buf[0] != 'o' || buf[1] != 'k') { if(buf[0] != 'o' || buf[1] != 'k') {
/* Cut and pasted from core/loader/elfloader.h */ /* Cut and pasted from core/loader/elfloader.h */
printf("ELFLOADER_OK 0\n" printf("OK 0\n"
"ELFLOADER_BAD_ELF_HEADER 1\n" "BAD_HEADER 1\n"
"ELFLOADER_NO_SYMTAB 2\n" "NO_SYMTAB 2\n"
"ELFLOADER_NO_STRTAB 3\n" "NO_STRTAB 3\n"
"ELFLOADER_NO_TEXT 4\n" "NO_TEXT 4\n"
"ELFLOADER_SYMBOL_NOT_FOUND 5\n" "UNDEFINED 5\n"
"ELFLOADER_SEGMENT_NOT_FOUND 6\n" "UNKNOWN_SEGMENT 6\n"
"ELFLOADER_NO_STARTPOINT 7\n"); "NO_STARTPOINT 7\n"
"TEXT_TO_LARGE 8\n"
"DATA_TO_LARGE 9\n"
"UNKNOWN_RELOC 10\n"
"MULTIPLY_DEFINED 11\n");
} }
exit(0); exit(0);
} }