unsigned int r_type = ELF32_R_TYPE (rela->r_info);
unsigned int orig_r_type = r_type;
reloc_howto_type *howto = elf_hppa_howto_table + r_type;
- int r_format = howto->bitsize;
+ int r_format;
enum hppa_reloc_field_selector_type_alt r_field;
bfd *input_bfd = input_section->owner;
bfd_vma offset = rela->r_offset;
break;
}
+ r_format = bfd_hppa_insn2fmt (input_bfd, insn);
+ switch (r_format)
+ {
+ 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;
+
+ 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;
+ }
insn = hppa_rebuild_insn (insn, val, r_format);
/* Update the instruction word. */
DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
fi
+DATA_SECTION_ALIGNMENT="${CREATE_SHLIB-${CREATE_PIE-ALIGN(8)}}"
ARCH=hppa
MACHINE=hppa1.1 # We use 1.1 specific features.
NOP=0x08000240
${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
- .data ${RELOCATING-0} :
+ .data ${RELOCATING-0}${RELOCATING+${DATA_SECTION_ALIGNMENT}} :
{
${RELOCATING+${DATA_START_SYMBOLS}}
*(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})