We are only prepared to turn a few of the operands into
relocs. */
fixP->fx_offset = value;
- if (operand->bits == 12 && operand->shift == 20)
+ if (operand->bits == 12 && operand->shift == 20 && !fixP->fx_pcrel)
{
fixP->fx_size = 2;
fixP->fx_where += 2;
fixP->fx_r_type = BFD_RELOC_390_12;
}
- else if (operand->bits == 12 && operand->shift == 36)
+ else if (operand->bits == 12 && operand->shift == 36 && !fixP->fx_pcrel)
{
fixP->fx_size = 2;
fixP->fx_where += 4;
fixP->fx_r_type = BFD_RELOC_390_12;
}
- else if (operand->bits == 20 && operand->shift == 20)
+ else if (operand->bits == 20 && operand->shift == 20 && !fixP->fx_pcrel)
{
fixP->fx_size = 4;
fixP->fx_where += 2;
fixP->fx_r_type = BFD_RELOC_390_20;
}
- else if (operand->bits == 8 && operand->shift == 8)
+ else if (operand->bits == 8 && operand->shift == 8 && !fixP->fx_pcrel)
{
fixP->fx_size = 1;
fixP->fx_where += 1;
fixP->fx_offset += 2;
fixP->fx_pcrel_adjust = 2;
}
+ else if (fixP->fx_pcrel)
+ {
+ fixP->fx_r_type = BFD_RELOC_16_PCREL;
+ fixP->fx_offset += 2;
+ fixP->fx_pcrel_adjust = 2;
+ }
else
fixP->fx_r_type = BFD_RELOC_16;
}
22: a7 08 00 00 [ ]*lhi %r0,0
[ ]*24: R_390_GOT16 test_R_390_GOT16
26: a7 08 00 00 [ ]*lhi %r0,0
-[ ]*28: R_390_16 test_R_390_PC16\+0x26
+[ ]*28: R_390_PC16 test_R_390_PC16\+0x28
2a: a7 e5 00 00 [ ]*bras %r14,2a <foo\+0x2a>
[ ]*2c: R_390_PC16DBL test_R_390_PC16DBL\+0x2
2e: a7 e5 00 00 [ ]*bras %r14,2e <foo\+0x2e>