diff options
author | Jeff Law <law@redhat.com> | 1999-09-09 14:20:18 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1999-09-09 14:20:18 +0000 |
commit | 8267b1550cbeeb920d610076d0ae93c8782750a8 (patch) | |
tree | 084e77d919c07344c0e7eebdeaefd7228a05cc2e /bfd | |
parent | 6849fb4de74db5686337c1b64a8ac1148c00ffed (diff) | |
download | fsf-binutils-gdb-8267b1550cbeeb920d610076d0ae93c8782750a8.zip fsf-binutils-gdb-8267b1550cbeeb920d610076d0ae93c8782750a8.tar.gz fsf-binutils-gdb-8267b1550cbeeb920d610076d0ae93c8782750a8.tar.bz2 |
* elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
(elf_hppa_relocate_insn): Similarly.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 3 | ||||
-rw-r--r-- | bfd/elf-hppa.h | 40 |
2 files changed, 41 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c2de851..eb05b49 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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. diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h index c8dab6c..765e4e7 100644 --- a/bfd/elf-hppa.h +++ b/bfd/elf-hppa.h @@ -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; |