aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-hppa.h
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1999-09-09 14:51:33 +0000
committerJeff Law <law@redhat.com>1999-09-09 14:51:33 +0000
commitb726396160834b3494134a288b0c3ef4e6db9401 (patch)
tree7c5e2c2f76ede6d661b61c9db6563a5eab489307 /bfd/elf-hppa.h
parent8267b1550cbeeb920d610076d0ae93c8782750a8 (diff)
downloadgdb-b726396160834b3494134a288b0c3ef4e6db9401.zip
gdb-b726396160834b3494134a288b0c3ef4e6db9401.tar.gz
gdb-b726396160834b3494134a288b0c3ef4e6db9401.tar.bz2
* elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
relocation, remove them. SECREL64->LTOFF16WF. (elf_hppa_final_link_relocate): Handle LTOFF* relocations. Handle DIR* relocations. (elf_hppa_relocate_insn): Similarly.
Diffstat (limited to 'bfd/elf-hppa.h')
-rw-r--r--bfd/elf-hppa.h62
1 files changed, 57 insertions, 5 deletions
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index 765e4e7..35520e7 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -159,8 +159,8 @@ static reloc_howto_type elf_hppa_howto_table[ELF_HOWTO_TABLE_SIZE] =
{R_PARISC_PCREL16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL16DF"},
{R_PARISC_DIR64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR64"},
- {R_PARISC_DIR64WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR64WR"},
- {R_PARISC_DIR64DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR64DR"},
+ {R_PARISC_NONE, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_NONE"},
+ {R_PARISC_NONE, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_NONE"},
{R_PARISC_DIR14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR14WR"},
{R_PARISC_DIR14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR14DR"},
{R_PARISC_DIR16F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR16F"},
@@ -182,8 +182,8 @@ static reloc_howto_type elf_hppa_howto_table[ELF_HOWTO_TABLE_SIZE] =
{R_PARISC_DLTIND14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTIND14DR"},
{R_PARISC_LTOFF16F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF16F"},
+ {R_PARISC_LTOFF16WF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF16DF"},
{R_PARISC_LTOFF16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF16DF"},
- {R_PARISC_SECREL64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_SECREL64"},
{R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED"},
{R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED"},
{R_PARISC_BASEREL14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_BSEREL14WR"},
@@ -1116,6 +1116,9 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
case R_PARISC_LTOFF_TP16F:
case R_PARISC_LTOFF_TP16WF:
case R_PARISC_LTOFF_TP16DF:
+ case R_PARISC_LTOFF16F:
+ case R_PARISC_LTOFF16WF:
+ case R_PARISC_LTOFF16DF:
{
/* We want the value of the DLT offset for this symbol, not
the symbol's actual address. */
@@ -1132,6 +1135,9 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
|| r_type == R_PARISC_LTOFF_FPTR16F
|| r_type == R_PARISC_LTOFF_FPTR16WF
|| r_type == R_PARISC_LTOFF_FPTR16DF
+ || r_type == R_PARISC_LTOFF16F
+ || r_type == R_PARISC_LTOFF16DF
+ || r_type == R_PARISC_LTOFF16WF
|| r_type == R_PARISC_LTOFF_TP16F
|| r_type == R_PARISC_LTOFF_TP16WF
|| r_type == R_PARISC_LTOFF_TP16DF)
@@ -1180,6 +1186,33 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
break;
}
+ case R_PARISC_DIR21L:
+ case R_PARISC_DIR17R:
+ case R_PARISC_DIR17F:
+ case R_PARISC_DIR14R:
+ case R_PARISC_DIR14WR:
+ case R_PARISC_DIR14DR:
+ case R_PARISC_DIR16F:
+ case R_PARISC_DIR16WF:
+ case R_PARISC_DIR16DF:
+ {
+ /* All DIR 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_DIR21L)
+ value = hppa_field_adjust (value, addend, e_lrsel);
+ else if (r_type == R_PARISC_DIR17F
+ || r_type == R_PARISC_DIR16F
+ || r_type == R_PARISC_DIR16WF
+ || r_type == R_PARISC_DIR16DF)
+ value = hppa_field_adjust (value, addend, e_fsel);
+ else
+ value = hppa_field_adjust (value, addend, e_rrsel);
+
+ insn = elf_hppa_relocate_insn (insn, value, r_type);
+ break;
+ }
+
case R_PARISC_PLTOFF21L:
case R_PARISC_PLTOFF14R:
case R_PARISC_PLTOFF14F:
@@ -1246,6 +1279,14 @@ 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_LTOFF64:
+ /* We want the value of the DLT offset for this symbol, not
+ the symbol's actual address. */
+ value = dyn_h->dlt_offset + hppa_info->dlt_sec->output_offset;
+
+ 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
@@ -1294,9 +1335,9 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
the basic support is functional we will return the not_supported
error conditional appropriately. */
#if 0
- return bfd_reloc_not_supported;
+ return bfd_reloc_not_supported;
#else
- return bfd_reloc_ok;
+ return bfd_reloc_ok;
#endif
}
@@ -1348,6 +1389,7 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
the "B" instruction as well as BE. */
case R_PARISC_PCREL17F:
case R_PARISC_DIR17F:
+ case R_PARISC_DIR17R:
case R_PARISC_PCREL17C:
case R_PARISC_PCREL17R:
{
@@ -1377,6 +1419,7 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
case R_PARISC_LTOFF_TP21L:
case R_PARISC_DPREL21L:
case R_PARISC_PLTOFF21L:
+ case R_PARISC_DIR21L:
{
int w;
@@ -1409,6 +1452,9 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
case R_PARISC_PLTOFF14R:
case R_PARISC_PLTOFF14F:
case R_PARISC_PLTOFF16F:
+ case R_PARISC_DIR14R:
+ case R_PARISC_DIR16F:
+ case R_PARISC_LTOFF16F:
{
int w;
@@ -1435,6 +1481,9 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
case R_PARISC_GPREL16DF:
case R_PARISC_PLTOFF14DR:
case R_PARISC_PLTOFF16DF:
+ case R_PARISC_DIR14DR:
+ case R_PARISC_DIR16DF:
+ case R_PARISC_LTOFF16DF:
{
int w;
@@ -1467,6 +1516,9 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
case R_PARISC_GPREL16WF:
case R_PARISC_PLTOFF14WR:
case R_PARISC_PLTOFF16WF:
+ case R_PARISC_DIR16WF:
+ case R_PARISC_DIR14WR:
+ case R_PARISC_LTOFF16WF:
{
int w;