aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-hppa.h
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1999-09-09 13:01:11 +0000
committerJeff Law <law@redhat.com>1999-09-09 13:01:11 +0000
commite5bb3efcc541090c045b441a84fdd90cad3babf5 (patch)
tree553bff7af69b27643295d5e7275cf8c7243b62aa /bfd/elf-hppa.h
parentbe7582f38aa26d985c03a6df16af98946e9b7b5b (diff)
downloadgdb-e5bb3efcc541090c045b441a84fdd90cad3babf5.zip
gdb-e5bb3efcc541090c045b441a84fdd90cad3babf5.tar.gz
gdb-e5bb3efcc541090c045b441a84fdd90cad3babf5.tar.bz2
* elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
DIR32, DIR64 and FPTR64 relocations. (elf_hppa_relocate_insn): Similarly.
Diffstat (limited to 'bfd/elf-hppa.h')
-rw-r--r--bfd/elf-hppa.h57
1 files changed, 52 insertions, 5 deletions
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index 2cc46c6..a73d273 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -1012,10 +1012,6 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
The list will be deleted eventually.
27210 R_PARISC_SEGREL32
- 6675 R_PARISC_FPTR64
- 3974 R_PARISC_DIR64
- 1584 R_PARISC_LTOFF_FPTR14DR
- 1565 R_PARISC_LTOFF_FPTR21L
1120 R_PARISC_PCREL64
1096 R_PARISC_LTOFF_TP14DR
982 R_PARISC_LTOFF_TP21L
@@ -1067,6 +1063,14 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
case R_PARISC_DLTIND14DR:
case R_PARISC_DLTIND14WR:
case R_PARISC_DLTIND21L:
+ case R_PARISC_LTOFF_FPTR14R:
+ case R_PARISC_LTOFF_FPTR14DR:
+ case R_PARISC_LTOFF_FPTR14WR:
+ case R_PARISC_LTOFF_FPTR21L:
+ case R_PARISC_LTOFF_FPTR16F:
+ case R_PARISC_LTOFF_FPTR16WF:
+ case R_PARISC_LTOFF_FPTR16DF:
+
{
/* We want the value of the DLT offset for this symbol, not
the symbol's actual address. */
@@ -1075,8 +1079,12 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
/* All DLTIND 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_DLTIND21L)
+ if (r_type == R_PARISC_DLTIND21L
+ || r_type == R_PARISC_LTOFF_FPTR21L)
value = hppa_field_adjust (value, addend, e_lrsel);
+ else if (r_type == R_PARISC_LTOFF_FPTR16F
+ || R_PARISC_LTOFF_FPTR16WF)
+ value = hppa_field_adjust (value, addend, e_fsel);
else
value = hppa_field_adjust (value, addend, e_rrsel);
@@ -1105,6 +1113,38 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
break;
}
+ case R_PARISC_LTOFF_FPTR32:
+ {
+ /* 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_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+ }
+
+
+ case R_PARISC_LTOFF_FPTR64:
+ {
+ /* 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, hit_data);
+ return bfd_reloc_ok;
+ }
+
+ case R_PARISC_DIR32:
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_PARISC_DIR64:
+ bfd_put_64 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ /* These do not require any work here. They are simply passed
+ through as dynamic relocations. */
+ case R_PARISC_FPTR64:
+ return bfd_reloc_ok;
+
/* Something we don't know how to handle. */
default:
/* ?!? This is temporary as we flesh out basic linker support, once
@@ -1186,6 +1226,7 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
/* ADDIL or LDIL instructions. */
case R_PARISC_DLTREL21L:
case R_PARISC_DLTIND21L:
+ case R_PARISC_LTOFF_FPTR21L:
{
int w;
@@ -1204,6 +1245,8 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
case R_PARISC_DLTREL14F:
case R_PARISC_DLTIND14R:
case R_PARISC_DLTIND14F:
+ case R_PARISC_LTOFF_FPTR14R:
+ case R_PARISC_LTOFF_FPTR16F:
{
int w;
@@ -1220,6 +1263,8 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
/* Doubleword loads and stores with a 14bit displacement. */
case R_PARISC_DLTREL14DR:
case R_PARISC_DLTIND14DR:
+ case R_PARISC_LTOFF_FPTR14DR:
+ case R_PARISC_LTOFF_FPTR16DF:
{
int w;
@@ -1242,6 +1287,8 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
/* Floating point single word load/store instructions. */
case R_PARISC_DLTREL14WR:
case R_PARISC_DLTIND14WR:
+ case R_PARISC_LTOFF_FPTR14WR:
+ case R_PARISC_LTOFF_FPTR16WF:
{
int w;