From 3e2f8274eeadd6bb0fcf5a8ae6e7aa186ded9f3b Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 12 Apr 2012 16:25:54 +0000 Subject: Support R_SPARC_WDISP10 and R_SPARC_H34. include/ * elf/sparc.h (R_SPARC_WDISP10): New reloc. * opcode/sparc.h: Define '=' as generating R_SPARC_WDISP10. opcodes/ * sparc-dis.c (X_DISP10): Define. (print_insn_sparc): Handle '='. bfd/ * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32, BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs. * libbfd.h: Regenerate. * bfd-in2.h: Likewise. * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function. (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10. (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs. (_bfd_sparc_elf_check_relocs): Likewise. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. gas/ * config/tc-sparc.c (sparc_ip): Handle '=', "%h34", "%l34", and BFD_RELOC_SPARC_H34. (md_apply_fix): Handle BFD_RELOC_SPARC_WDISP10 and BFD_RELOC_SPARC_H34. (tc_gen_reloc): Likewise. gas/testsuite/ * gas/sparc/reloc64.s: Add abs34 code model tests. * gas/sparc/reloc64.d: Update. elfcpp/ * sparc.h (R_SPARC_WDISP10): New relocation. gold/ * sparc.cc (Reloc::wdisp10): New relocation method. (Reloc::h34): Likewise. (Target_sparc::Scan::check_non_pic): Handle R_SPARC_H34. (Target_sparc::Scan::get_reference_flags): Handle R_SPARC_H34 and R_SPARC_WDISP10. (Target_sparc::Scan::local): Likewise. (Target_sparc::Scan::global): Likewise. (Target_sparc::Relocate::relocate): Likewise. --- elfcpp/ChangeLog | 4 ++++ elfcpp/sparc.h | 1 + 2 files changed, 5 insertions(+) (limited to 'elfcpp') diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog index f606faad4d..3a764014d1 100644 --- a/elfcpp/ChangeLog +++ b/elfcpp/ChangeLog @@ -1,3 +1,7 @@ +2012-04-12 David S. Miller + + * sparc.h (R_SPARC_WDISP10): New relocation. + 2012-03-12 Cary Coutant Update DWARF enums from ../include/dwarf2.h. diff --git a/elfcpp/sparc.h b/elfcpp/sparc.h index 6a9193b355..77c4668773 100644 --- a/elfcpp/sparc.h +++ b/elfcpp/sparc.h @@ -140,6 +140,7 @@ enum R_SPARC_H34 = 85, // Direct high 12 of 34 bit R_SPARC_SIZE32 = 86, // size of symbol, 32-bit R_SPARC_SIZE64 = 87, // size of symbol, 64-bit + R_SPARC_WDISP10 = 88, // PC relative 10 bit shifted R_SPARC_IRELATIVE = 249, // Adjust indirectly by program base -- cgit v1.2.1