From: David Given Date: Wed, 29 May 2013 13:11:04 +0000 (+0100) Subject: Use relocation enumerations rather than hard-coded values for relocation types X-Git-Tag: release-6-0-pre-5~21 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e0c121d6e6d015806df2a95d53f36dd7b1834766;p=ack.git Use relocation enumerations rather than hard-coded values for relocation types (these were causing problems due to the enumeration values having changed). --- diff --git a/mach/proto/as/comm3.c b/mach/proto/as/comm3.c index a5490e249..f35d1818c 100644 --- a/mach/proto/as/comm3.c +++ b/mach/proto/as/comm3.c @@ -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", diff --git a/mach/proto/as/comm7.c b/mach/proto/as/comm7.c index fbbe42392..d0a147bdb 100644 --- a/mach/proto/as/comm7.c +++ b/mach/proto/as/comm7.c @@ -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