break;
}
- r_format = bfd_hppa_insn2fmt (input_bfd, insn);
- switch (r_format)
+ switch (r_type)
{
- case 10:
- case -10:
- if (val & 7)
- {
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%pB(%pA+%#" PRIx64 "): displacement %#x for insn %#x "
- "is not a multiple of 8 (gp %#x)"),
- input_bfd,
- input_section,
- (uint64_t) offset,
- val,
- insn,
- (unsigned int) elf_gp (input_section->output_section->owner));
- bfd_set_error (bfd_error_bad_value);
- return bfd_reloc_notsupported;
- }
+ case R_PARISC_DIR32:
+ case R_PARISC_SECREL32:
+ case R_PARISC_SEGBASE:
+ case R_PARISC_SEGREL32:
+ case R_PARISC_PLABEL32:
+ /* These relocations apply to data. */
+ r_format = howto->bitsize;
break;
- case -11:
- case -16:
- if (val & 3)
+ default:
+ r_format = bfd_hppa_insn2fmt (input_bfd, insn);
+ switch (r_format)
{
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%pB(%pA+%#" PRIx64 "): displacement %#x for insn %#x "
- "is not a multiple of 4 (gp %#x)"),
- input_bfd,
- input_section,
- (uint64_t) offset,
- val,
- insn,
- (unsigned int) elf_gp (input_section->output_section->owner));
- bfd_set_error (bfd_error_bad_value);
- return bfd_reloc_notsupported;
- }
- break;
+ case 10:
+ case -10:
+ if (val & 7)
+ {
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%pB(%pA+%#" PRIx64 "): displacement %#x for insn %#x "
+ "is not a multiple of 8 (gp %#x)"),
+ input_bfd,
+ input_section,
+ (uint64_t) offset,
+ val,
+ insn,
+ (unsigned int) elf_gp (input_section->output_section->owner));
+ bfd_set_error (bfd_error_bad_value);
+ return bfd_reloc_notsupported;
+ }
+ break;
- default:
+ case -11:
+ case -16:
+ if (val & 3)
+ {
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%pB(%pA+%#" PRIx64 "): displacement %#x for insn %#x "
+ "is not a multiple of 4 (gp %#x)"),
+ input_bfd,
+ input_section,
+ (uint64_t) offset,
+ val,
+ insn,
+ (unsigned int) elf_gp (input_section->output_section->owner));
+ bfd_set_error (bfd_error_bad_value);
+ return bfd_reloc_notsupported;
+ }
+ break;
+
+ default:
+ break;
+ }
break;
}
insn = hppa_rebuild_insn (insn, val, r_format);