+ case R_MMIX_PUSHJ_STUBBABLE:
+ /* If the address fits, we're fine. */
+ if ((value & 3) == 0
+ /* Note rightshift 0; see R_MMIX_JMP case below. */
+ && (r = bfd_check_overflow (complain_overflow_signed,
+ howto->bitsize,
+ 0,
+ bfd_arch_bits_per_address (abfd),
+ value)) == bfd_reloc_ok)
+ goto pcrel_mmix_reloc_fits;
+ else
+ {
+ bfd_size_type size = isec->rawsize ? isec->rawsize : isec->size;
+
+ /* We have the bytes at the PUSHJ insn and need to get the
+ position for the stub. There's supposed to be room allocated
+ for the stub. */
+ bfd_byte *stubcontents
+ = ((bfd_byte *) datap
+ - (addr - (isec->output_section->vma + isec->output_offset))
+ + size
+ + mmix_elf_section_data (isec)->pjs.stub_offset);
+ bfd_vma stubaddr;
+
+ if (mmix_elf_section_data (isec)->pjs.n_pushj_relocs == 0)
+ {
+ /* This shouldn't happen when linking to ELF or mmo, so
+ this is an attempt to link to "binary", right? We
+ can't access the output bfd, so we can't verify that
+ assumption. We only know that the critical
+ mmix_elf_check_common_relocs has not been called,
+ which happens when the output format is different
+ from the input format (and is not mmo). */
+ if (! mmix_elf_section_data (isec)->has_warned_pushj)
+ {
+ /* For the first such error per input section, produce
+ a verbose message. */
+ *error_message
+ = _("invalid input relocation when producing"
+ " non-ELF, non-mmo format output;"
+ " please use the objcopy program to convert from"
+ " ELF or mmo,"
+ " or assemble using"
+ " \"-no-expand\" (for gcc, \"-Wa,-no-expand\"");
+ mmix_elf_section_data (isec)->has_warned_pushj = TRUE;
+ return bfd_reloc_dangerous;
+ }
+
+ /* For subsequent errors, return this one, which is
+ rate-limited but looks a little bit different,
+ hopefully without affecting user-friendliness. */
+ return bfd_reloc_overflow;
+ }
+
+ /* The address doesn't fit, so redirect the PUSHJ to the
+ location of the stub. */
+ r = mmix_elf_perform_relocation (isec,
+ &elf_mmix_howto_table
+ [R_MMIX_ADDR19],
+ datap,
+ addr,
+ isec->output_section->vma
+ + isec->output_offset
+ + size
+ + (mmix_elf_section_data (isec)
+ ->pjs.stub_offset)
+ - addr,
+ error_message);
+ if (r != bfd_reloc_ok)
+ return r;
+
+ stubaddr
+ = (isec->output_section->vma
+ + isec->output_offset
+ + size
+ + mmix_elf_section_data (isec)->pjs.stub_offset);
+
+ /* We generate a simple JMP if that suffices, else the whole 5
+ insn stub. */
+ if (bfd_check_overflow (complain_overflow_signed,
+ elf_mmix_howto_table[R_MMIX_ADDR27].bitsize,
+ 0,
+ bfd_arch_bits_per_address (abfd),
+ addr + value - stubaddr) == bfd_reloc_ok)
+ {
+ bfd_put_32 (abfd, JMP_INSN_BYTE << 24, stubcontents);
+ r = mmix_elf_perform_relocation (isec,
+ &elf_mmix_howto_table
+ [R_MMIX_ADDR27],
+ stubcontents,
+ stubaddr,
+ value + addr - stubaddr,
+ error_message);
+ mmix_elf_section_data (isec)->pjs.stub_offset += 4;
+
+ if (size + mmix_elf_section_data (isec)->pjs.stub_offset
+ > isec->size)
+ abort ();
+
+ return r;
+ }
+ else
+ {
+ /* Put a "GO $255,0" after the common sequence. */
+ bfd_put_32 (abfd,
+ ((GO_INSN_BYTE | IMM_OFFSET_BIT) << 24)
+ | 0xff00, (bfd_byte *) stubcontents + 16);
+
+ /* Prepare for the general code to set the first part of the
+ linker stub, and */
+ value += addr;
+ datap = stubcontents;
+ mmix_elf_section_data (isec)->pjs.stub_offset
+ += MAX_PUSHJ_STUB_SIZE;
+ }
+ }
+ break;
+