+2020-02-21 Alan Modra <amodra@gmail.com>
+
+ * config/tc-pdp11.c (md_apply_fix): Handle BFD_RELOC_32.
+ (tc_gen_reloc): Only give a BAD_CASE assertion on pcrel relocs.
+
2020-02-21 Alan Modra <amodra@gmail.com>
PR 25569
mask = 0xffff;
shift = 0;
break;
+ case BFD_RELOC_32:
+ mask = 0xffffffff;
+ shift = 0;
+ break;
case BFD_RELOC_PDP11_DISP_8_PCREL:
mask = 0x00ff;
shift = 1;
/* This is taken account for in md_apply_fix(). */
reloc->addend = -symbol_get_bfdsym (fixp->fx_addsy)->section->vma;
- switch (fixp->fx_r_type)
+ code = fixp->fx_r_type;
+ if (fixp->fx_pcrel)
{
- case BFD_RELOC_16:
- if (fixp->fx_pcrel)
- code = BFD_RELOC_16_PCREL;
- else
- code = BFD_RELOC_16;
- break;
+ switch (code)
+ {
+ case BFD_RELOC_16:
+ code = BFD_RELOC_16_PCREL;
+ break;
- case BFD_RELOC_16_PCREL:
- code = BFD_RELOC_16_PCREL;
- break;
+ case BFD_RELOC_16_PCREL:
+ break;
- default:
- BAD_CASE (fixp->fx_r_type);
- return NULL;
+ default:
+ BAD_CASE (code);
+ return NULL;
+ }
}
reloc->howto = bfd_reloc_type_lookup (stdoutput, code);