Use relocation enumerations rather than hard-coded values for relocation types
(these were causing problems due to the enumeration values having changed).
This commit is contained in:
parent
fc1b3672a3
commit
e0c121d6e6
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue