From 5e99c156722a1658285441591709ae73e150ee3b Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Fri, 13 Jul 2012 15:47:25 +0000 Subject: [PATCH] 2012-07-13 Andreas Krebbel * elf64-s390.c: Include elf-s390-common.c. (R_390_IRELATIVE): New reloc. (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE. (RELA_ENTRY_SIZE): New macro. (elf_s390_link_hash_entry): New fields ifunc_resolver_address and *ifunc_resolver_section. (struct plt_entry): New struct. (struct elf_s390_obj_tdata): New field local_plt. (elf_s390_local_plt): New macro. (struct elf_s390_link_hash_table): New field irelifunc. (ELF64): New macro. (link_hash_newfunc): Initialize new fields. (elf_s390_check_relocs): Handle IFUNC symbols. (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC symbols. (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for IFUNC symbols. (elf_s390_size_dynamic_sections): Handle IFUNC symbols. (elf_s390_relocate_section): Likewise. (elf_s390_finish_dynamic_symbol): Likewise. (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols. (elf_s390_finish_ifunc_symbol): New function. (elf_s390_gc_sweep_hook): Handle local plt entries. (elf_backend_add_symbol_hook): Define. * elf32-s390.c: See elf64-s390.c changes. * elf-s390-common.c: New file. * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field. * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for BFD_RELOC_390_IRELATIVE. * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation. 2012-07-13 Andreas Krebbel * elf/s390.h (START_RELOC_NUMBERS): Define R_390_IRELATIVE reloc. 2012-07-13 Andreas Krebbel * emulparams/elf_s390.sh (IREL_IN_PLT): Define. * emulparams/elf64_s390.sh (IREL_IN_PLT): Define. --- include/ChangeLog | 4 ++++ include/elf/s390.h | 1 + 2 files changed, 5 insertions(+) diff --git a/include/ChangeLog b/include/ChangeLog index aad44435f..08e1a793d 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2012-07-13 Andreas Krebbel + + * elf/s390.h (START_RELOC_NUMBERS): Define R_390_IRELATIVE reloc. + 2012-06-18 Doug Evans * dwarf2.def (DW_OP): Add DW_OP_GNU_const_index. diff --git a/include/elf/s390.h b/include/elf/s390.h index 807b7e8e0..a5b4217bc 100644 --- a/include/elf/s390.h +++ b/include/elf/s390.h @@ -119,6 +119,7 @@ START_RELOC_NUMBERS (elf_s390_reloc_type) RELOC_NUMBER (R_390_GOTPLT20, 59) /* 20 bit offset to jump slot. */ RELOC_NUMBER (R_390_TLS_GOTIE20, 60)/* 20 bit GOT offset for statis TLS block offset. */ + RELOC_NUMBER (R_390_IRELATIVE, 61) /* IFUNC relocation. */ /* These are GNU extensions to enable C++ vtable garbage collection. */ RELOC_NUMBER (R_390_GNU_VTINHERIT, 250) RELOC_NUMBER (R_390_GNU_VTENTRY, 251)