Put IRELATIVE relocations after JUMP_SLOT.
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 21 Oct 2011 15:13:37 +0000 (15:13 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 21 Oct 2011 15:13:37 +0000 (15:13 +0000)
commite1f987424b7b3f5ac63a2a6ae044a202a44b8ff8
tree3d07b587ea6ee595937027d07e992bb434085d08
parentf8e24652cb7bb02eb602d1c8a10ef068b8612cf9
Put IRELATIVE relocations after JUMP_SLOT.

bfd/

2011-10-21  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/13302
* elf32-i386.c (elf_i386_link_hash_table): Add next_jump_slot_index
and next_irelative_index.
(elf_i386_link_hash_table_create): Initialize next_jump_slot_index
and next_irelative_index.
(elf_i386_allocate_dynrelocs): Increment reloc_count instead of
next_tls_desc_index.
(elf_i386_size_dynamic_sections): Set next_tls_desc_index and
next_irelative_index from reloc_count.
(elf_i386_finish_dynamic_symbol): Put R_386_IRELATIVE after
R_386_JUMP_SLOT.

* elf64-x86-64.c (elf_x86_64_link_hash_table): Add
next_jump_slot_index and next_irelative_index.
(elf_x86_64_link_hash_table_create): Initialize
next_jump_slot_index and next_irelative_index.
(elf_x86_64_size_dynamic_sections): Set next_irelative_index
from reloc_count.
(elf_x86_64_finish_dynamic_symbol): Put R_X86_64_IRELATIVE after
R_X86_64_JUMP_SLOT.

ld/testsuite/

2011-10-21  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/13302
* ld-ifunc/ifunc-16-i386.d: New.
* ld-ifunc/ifunc-16-x86-64.d: Likewise.
* ld-ifunc/ifunc-16-x86.s: Likewise.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/testsuite/ChangeLog
ld/testsuite/ld-ifunc/ifunc-16-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-16-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-16-x86.s [new file with mode: 0644]