From a71b149e29faf4e7fd9f66cac26bf6221d5d1b7d Mon Sep 17 00:00:00 2001
From: bg- <bg->
Date: Thu, 26 Apr 2007 12:54:13 +0000
Subject: [PATCH] * Add/update linker & loader error codes.

---
 core/loader/cmod.h |  8 ++++----
 tools/codeprop.c   | 22 +++++++++++++---------
 2 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/core/loader/cmod.h b/core/loader/cmod.h
index b32a689a2..3a8bac97e 100644
--- a/core/loader/cmod.h
+++ b/core/loader/cmod.h
@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
  * 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
@@ -49,8 +49,8 @@ cmod_load(unsigned imod,
 void cmod_unload(int imod);
 
 /* Most error codes are chared with elfloader and cle. */
-#define CMOD_OK                  0
-#define CMOD_NO_STARTPOINT       7
-#define CMOD_DATA_TO_LARGE       9
+#define CMOD_OK                  CLE_OK
+#define CMOD_NO_STARTPOINT       CLE_NO_STARTPOINT
+#define CMOD_DATA_TO_LARGE       CLE_DATA_TO_LARGE
 
 #endif /* CMOD_H */
diff --git a/tools/codeprop.c b/tools/codeprop.c
index 3e66bf080..7d7191389 100644
--- a/tools/codeprop.c
+++ b/tools/codeprop.c
@@ -28,7 +28,7 @@
  *
  * 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 <stdio.h>
@@ -107,14 +107,18 @@ main(int argc, char **argv) {
       printf("Reply: %s", buf);
       if(buf[0] != 'o' || buf[1] != 'k') {
 	/* Cut and pasted from core/loader/elfloader.h */
-	printf("ELFLOADER_OK                  0\n"
-	       "ELFLOADER_BAD_ELF_HEADER      1\n"
-	       "ELFLOADER_NO_SYMTAB           2\n"
-	       "ELFLOADER_NO_STRTAB           3\n"
-	       "ELFLOADER_NO_TEXT             4\n"
-	       "ELFLOADER_SYMBOL_NOT_FOUND    5\n"
-	       "ELFLOADER_SEGMENT_NOT_FOUND   6\n"
-	       "ELFLOADER_NO_STARTPOINT       7\n");
+	printf("OK                  0\n"
+	       "BAD_HEADER          1\n"
+	       "NO_SYMTAB           2\n"
+	       "NO_STRTAB           3\n"
+	       "NO_TEXT             4\n"
+	       "UNDEFINED           5\n"
+	       "UNKNOWN_SEGMENT     6\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);
     }