+ case R_PARISC_SEGREL64:
+ {
+ /* If this is the first SEGREL relocation, then initialize
+ the segment base values. */
+ if (hppa_info->text_segment_base == (bfd_vma) -1)
+ bfd_map_over_sections (output_bfd, elf_hppa_record_segment_addrs,
+ elf64_hppa_hash_table (info));
+
+ /* VALUE holds the absolute address. We want to include the
+ addend, then turn it into a segment relative address.
+
+ The segment is derived from SYM_SEC. We assume that there are
+ only two segments of note in the resulting executable/shlib.
+ A readonly segment (.text) and a readwrite segment (.data). */
+ value += addend;
+
+ if (sym_sec->flags & SEC_CODE)
+ value -= hppa_info->text_segment_base;
+ else
+ value -= hppa_info->data_segment_base;
+
+ if (r_type == R_PARISC_SEGREL32)
+ bfd_put_32 (input_bfd, value, hit_data);
+ else
+ bfd_put_64 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+ }
+