summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-08 20:28:43 +0000
committerDavid S. Miller <davem@davemloft.net>2010-02-08 20:28:43 +0000
commit95fc66f6cbd8464c9667cf7c9d84dd935e3b119e (patch)
tree84d7afb3964e4ca94442245f491dd5903dad583e
parentab608bc732e0846792428344b918197d20af1f21 (diff)
downloadcygnal-95fc66f6cbd8464c9667cf7c9d84dd935e3b119e.tar.gz
cygnal-95fc66f6cbd8464c9667cf7c9d84dd935e3b119e.tar.bz2
cygnal-95fc66f6cbd8464c9667cf7c9d84dd935e3b119e.zip
include/
* elf/sparc.h (R_SPARC_JMP_IREL, R_SPARC_IRELATIVE): Define. bfd/ * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New. (BFD_RELOC_SPARC_IRELATIVE): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table and loc_hash_memory. (_bfd_sparc_elf_link_hash_table_free): Declare. * elf32-sparc.c (elf32_sparc_add_symbol_hook): New. (elf_backend_add_symbol_hook, elf_backend_post_process_headers, bfd_elf32_bfd_link_hash_table_free): Define. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set has_ifunc_symbols if STT_GNU_IFUNC. (bfd_elf64_bfd_link_hash_table_free): Define. (elf_backend_post_process_headers): Define always. * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New. (sparc_reloc_map): Add entries for new IFUNC relocs. (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs. (_bfd_sparc_elf_info_to_howto_ptr): Likewise. (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq, elf_sparc_get_local_sym_hash): New. (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization from here... (_bfd_sparc_elf_link_hash_table_create): ... to here. Allocate local hash table. (_bfd_sparc_elf_link_hash_table_free): New. (create_ifunc_sections): New. (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj and call create_ifunc_sections(). For local STT_GNU_IFUNC symbols cons up a fake local hash table entry for it. Unconditionally add a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular. Count dyn relocs for ifunc. (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc. (allocate_dynrelocs): Unconditionally emit a PLT entry when STT_GNU_IFUNC and h->def_regular. Count GOT dyn relocs for ifunc. (allocate_local_dynrelocs): New function. (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash table. Emit dynamic relocs to irelplt when not shared. Treat iplt like splt. (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand. (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt in iplt/irelplt. ld/testsuite/ * ld-ifunc/ifunc.exp: Run for sparc.
-rw-r--r--include/ChangeLog4
-rw-r--r--include/elf/sparc.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index db4665407..64f6e1fbd 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-08 David S. Miller <davem@davemloft.net>
+
+ * elf/sparc.h (R_SPARC_JMP_IREL, R_SPARC_IRELATIVE): Define.
+
2010-01-13 Joel Brobecker <brobecker@adacore.com>
Add new DW_AT_use_GNAT_descriptive_type CU attribute.
diff --git a/include/elf/sparc.h b/include/elf/sparc.h
index 68d6285ee..f7458df1a 100644
--- a/include/elf/sparc.h
+++ b/include/elf/sparc.h
@@ -164,6 +164,8 @@ START_RELOC_NUMBERS (elf_sparc_reloc_type)
EMPTY_RELOC (R_SPARC_max_std)
+ RELOC_NUMBER (R_SPARC_JMP_IREL, 248)
+ RELOC_NUMBER (R_SPARC_IRELATIVE, 249)
RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250)
RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251)
RELOC_NUMBER (R_SPARC_REV32, 252)