summaryrefslogtreecommitdiff
path: root/libguile/objcodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/objcodes.c')
-rw-r--r--libguile/objcodes.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libguile/objcodes.c b/libguile/objcodes.c
index 4f219717a..d5d66952c 100644
--- a/libguile/objcodes.c
+++ b/libguile/objcodes.c
@@ -33,8 +33,22 @@
#include "programs.h"
#include "objcodes.h"
+/* The endianness marker in objcode. */
+#ifdef WORDS_BIGENDIAN
+# define OBJCODE_ENDIANNESS "BE"
+#else
+# define OBJCODE_ENDIANNESS "LE"
+#endif
+
+#define _OBJCODE_STRINGIFY(x) # x
+#define OBJCODE_STRINGIFY(x) _OBJCODE_STRINGIFY (x)
+
+/* The word size marker in objcode. */
+#define OBJCODE_WORD_SIZE OBJCODE_STRINGIFY (SIZEOF_VOID_P)
+
/* nb, the length of the header should be a multiple of 8 bytes */
-#define OBJCODE_COOKIE "GOOF-0.6"
+#define OBJCODE_COOKIE \
+ "GOOF-0.6-" OBJCODE_ENDIANNESS "-" OBJCODE_WORD_SIZE "---"
/*