* elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
GPREL* relocations. (elf_hppa_relocate_insn): Similarly.
This commit is contained in:
parent
b233eaabc0
commit
6849fb4de7
2 changed files with 36 additions and 3 deletions
|
@ -1,5 +1,9 @@
|
|||
Wed Sep 8 17:56:11 1999 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
|
||||
GPREL* relocations.
|
||||
(elf_hppa_relocate_insn): Similarly.
|
||||
|
||||
* elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
|
||||
Handle LTOFF_TP* relocs.
|
||||
(elf_hppa_relocate_insn): Similarly.
|
||||
|
|
|
@ -1012,7 +1012,6 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
|
|||
The list will be deleted eventually.
|
||||
|
||||
27210 R_PARISC_SEGREL32
|
||||
791 R_PARISC_GPREL64
|
||||
772 R_PARISC_PLTOFF14DR
|
||||
386 R_PARISC_PLTOFF21L
|
||||
6 R_PARISC_LTOFF64
|
||||
|
@ -1151,6 +1150,14 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
|
|||
case R_PARISC_DLTREL14DR:
|
||||
case R_PARISC_DLTREL14WR:
|
||||
case R_PARISC_DLTREL21L:
|
||||
case R_PARISC_DPREL21L:
|
||||
case R_PARISC_DPREL14WR:
|
||||
case R_PARISC_DPREL14DR:
|
||||
case R_PARISC_DPREL14R:
|
||||
case R_PARISC_DPREL14F:
|
||||
case R_PARISC_GPREL16F:
|
||||
case R_PARISC_GPREL16WF:
|
||||
case R_PARISC_GPREL16DF:
|
||||
{
|
||||
/* Subtract out the global pointer value to make value a DLT
|
||||
relative address. */
|
||||
|
@ -1159,9 +1166,14 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
|
|||
/* All DLTREL relocations are basically the same at this point,
|
||||
except that we need different field selectors for the 21bit
|
||||
version vs the 14bit versions. */
|
||||
if (r_type == R_PARISC_DLTREL21L)
|
||||
if (r_type == R_PARISC_DLTREL21L
|
||||
|| r_type == R_PARISC_DPREL21L)
|
||||
value = hppa_field_adjust (value, addend, e_lrsel);
|
||||
else if (r_type == R_PARISC_DLTREL14F)
|
||||
else if (r_type == R_PARISC_DLTREL14F
|
||||
|| r_type == R_PARISC_DPREL14F
|
||||
|| r_type == R_PARISC_GPREL16F
|
||||
|| r_type == R_PARISC_GPREL16WF
|
||||
|| r_type == R_PARISC_GPREL16DF)
|
||||
value = hppa_field_adjust (value, addend, e_fsel);
|
||||
else
|
||||
value = hppa_field_adjust (value, addend, e_rrsel);
|
||||
|
@ -1197,6 +1209,15 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
|
|||
bfd_put_64 (input_bfd, value + addend, hit_data);
|
||||
return bfd_reloc_ok;
|
||||
|
||||
case R_PARISC_GPREL64:
|
||||
/* Subtract out the global pointer value to make value a DLT
|
||||
relative address. */
|
||||
value -= _bfd_get_gp_value (output_bfd);
|
||||
value += addend;
|
||||
|
||||
bfd_put_64 (input_bfd, value + addend, hit_data);
|
||||
return bfd_reloc_ok;
|
||||
|
||||
case R_PARISC_PCREL32:
|
||||
{
|
||||
/* If this is a call to a function defined in another dynamic
|
||||
|
@ -1326,6 +1347,7 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
|
|||
case R_PARISC_LTOFF_FPTR21L:
|
||||
case R_PARISC_PCREL21L:
|
||||
case R_PARISC_LTOFF_TP21L:
|
||||
case R_PARISC_DPREL21L:
|
||||
{
|
||||
int w;
|
||||
|
||||
|
@ -1352,6 +1374,9 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
|
|||
case R_PARISC_LTOFF_TP14R:
|
||||
case R_PARISC_LTOFF_TP14F:
|
||||
case R_PARISC_LTOFF_TP16F:
|
||||
case R_PARISC_DPREL14R:
|
||||
case R_PARISC_DPREL14F:
|
||||
case R_PARISC_GPREL16F:
|
||||
{
|
||||
int w;
|
||||
|
||||
|
@ -1374,6 +1399,8 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
|
|||
case R_PARISC_PCREL16DF:
|
||||
case R_PARISC_LTOFF_TP14DR:
|
||||
case R_PARISC_LTOFF_TP16DF:
|
||||
case R_PARISC_DPREL14DR:
|
||||
case R_PARISC_GPREL16DF:
|
||||
{
|
||||
int w;
|
||||
|
||||
|
@ -1402,6 +1429,8 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
|
|||
case R_PARISC_PCREL16WF:
|
||||
case R_PARISC_LTOFF_TP14WR:
|
||||
case R_PARISC_LTOFF_TP16WF:
|
||||
case R_PARISC_DPREL14WR:
|
||||
case R_PARISC_GPREL16WF:
|
||||
{
|
||||
int w;
|
||||
|
||||
|
|
Loading…
Reference in a new issue