Use relocation enumerations rather than hard-coded values for relocation types
authorDavid Given <dg@cowlark.com>
Wed, 29 May 2013 13:11:04 +0000 (14:11 +0100)
committerDavid Given <dg@cowlark.com>
Wed, 29 May 2013 13:11:04 +0000 (14:11 +0100)
(these were causing problems due to the enumeration values having changed).

mach/proto/as/comm3.c
mach/proto/as/comm7.c

index a5490e2..f35d181 100644 (file)
@@ -26,9 +26,9 @@ item_t        keytab[] = {
        0,      EXTERN,         0,              ".define",
        0,      EXTERN,         0,              ".extern",
        0,      DOT,            0,              ".",
-       0,      DATA,           1,              ".data1",
-       0,      DATA,           2,              ".data2",
-       0,      DATA,           4,              ".data4",
+       0,      DATA,           RELO1,  ".data1",
+       0,      DATA,           RELO2,  ".data2",
+       0,      DATA,           RELO4,  ".data4",
        0,      ASCII,          0,              ".ascii",
        0,      ASCII,          1,              ".asciz",
        0,      ALIGN,          0,              ".align",
index fbbe423..d0a147b 100644 (file)
@@ -293,16 +293,16 @@ valu_t val;
 int n;
 {
        switch (n) {
-       case 1:
+       case RELO1:
                emit1((int)val); break;
-       case 2:
+       case RELO2:
 #ifdef BYTES_REVERSED
                emit1(((int)val>>8)); emit1((int)val);
 #else
                emit1((int)val); emit1(((int)val>>8));
 #endif
                break;
-       case 4:
+       case RELO4:
 #ifdef WORDS_REVERSED
                emit2((int)(val>>16)); emit2((int)(val));
 #else