* elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
authorJeff Law <law@redhat.com>
Thu, 9 Sep 1999 14:20:18 +0000 (14:20 +0000)
committerJeff Law <law@redhat.com>
Thu, 9 Sep 1999 14:20:18 +0000 (14:20 +0000)
        (elf_hppa_relocate_insn): Similarly.

bfd/ChangeLog
bfd/elf-hppa.h

index c2de8513f80e561830cdff5ad4a7225eeb30b939..eb05b4953851b91c2518d8a5a1202fd137936adf 100644 (file)
@@ -1,5 +1,8 @@
 Wed Sep  8 17:56:11 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
+       (elf_hppa_relocate_insn): Similarly.
+
        * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
        GPREL* relocations.
        (elf_hppa_relocate_insn): Similarly.
index c8dab6c632fec30c62891054980d467062348056..765e4e729da34aa99f2f187cbcc97168a7f1a113 100644 (file)
@@ -1012,8 +1012,6 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
    The list will be deleted eventually.
 
    27210 R_PARISC_SEGREL32
-   772 R_PARISC_PLTOFF14DR
-   386 R_PARISC_PLTOFF21L
    6 R_PARISC_LTOFF64
    5 R_PARISC_SEGREL64  */
 
@@ -1182,6 +1180,36 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
        break;
       }
 
+    case R_PARISC_PLTOFF21L:
+    case R_PARISC_PLTOFF14R:
+    case R_PARISC_PLTOFF14F:
+    case R_PARISC_PLTOFF14WR:
+    case R_PARISC_PLTOFF14DR:
+    case R_PARISC_PLTOFF16F:
+    case R_PARISC_PLTOFF16WF:
+    case R_PARISC_PLTOFF16DF:
+      {
+       /* We want the value of the PLT offset for this symbol, not
+          the symbol's actual address.  */
+       value = dyn_h->plt_offset + hppa_info->plt_sec->output_offset;
+
+       /* All PLTOFF 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_PLTOFF21L)
+         value = hppa_field_adjust (value, addend, e_lrsel);
+       else if (r_type == R_PARISC_PLTOFF14F
+                || r_type == R_PARISC_PLTOFF16F
+                || r_type == R_PARISC_PLTOFF16WF
+                || r_type == R_PARISC_PLTOFF16DF)
+         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_LTOFF_FPTR32:
       {
        /* We want the value of the DLT offset for this symbol, not
@@ -1348,6 +1376,7 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
     case R_PARISC_PCREL21L:
     case R_PARISC_LTOFF_TP21L:
     case R_PARISC_DPREL21L:
+    case R_PARISC_PLTOFF21L:
       {
         int w;
 
@@ -1377,6 +1406,9 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
     case R_PARISC_DPREL14R:
     case R_PARISC_DPREL14F:
     case R_PARISC_GPREL16F:
+    case R_PARISC_PLTOFF14R:
+    case R_PARISC_PLTOFF14F:
+    case R_PARISC_PLTOFF16F:
       {
         int w;
 
@@ -1401,6 +1433,8 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
     case R_PARISC_LTOFF_TP16DF:
     case R_PARISC_DPREL14DR:
     case R_PARISC_GPREL16DF:
+    case R_PARISC_PLTOFF14DR:
+    case R_PARISC_PLTOFF16DF:
       {
         int w;
 
@@ -1431,6 +1465,8 @@ elf_hppa_relocate_insn (insn, sym_value, r_type)
     case R_PARISC_LTOFF_TP16WF:
     case R_PARISC_DPREL14WR:
     case R_PARISC_GPREL16WF:
+    case R_PARISC_PLTOFF14WR:
+    case R_PARISC_PLTOFF16WF:
       {
         int w;
 
This page took 0.03018 seconds and 4 git commands to generate.