Import fixes on 2.24 branch that affect AArch64 IFUNC and PLT handling.
This commit is contained in:
parent
edae137564
commit
7c1c0bfb2b
93
binutils-2.24-elfnn-aarch64.patch
Normal file
93
binutils-2.24-elfnn-aarch64.patch
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
*** ../binutils-2.24.orig/bfd/elfnn-aarch64.c 2013-12-17 11:16:28.723807381 +0000
|
||||||
|
--- bfd/elfnn-aarch64.c 2013-12-17 11:18:13.517804067 +0000
|
||||||
|
*************** _aarch64_elf_section_data;
|
||||||
|
*** 1679,1686 ****
|
||||||
|
#define elf_aarch64_section_data(sec) \
|
||||||
|
((_aarch64_elf_section_data *) elf_section_data (sec))
|
||||||
|
|
||||||
|
! /* The size of the thread control block. */
|
||||||
|
! #define TCB_SIZE 16
|
||||||
|
|
||||||
|
struct elf_aarch64_local_symbol
|
||||||
|
{
|
||||||
|
--- 1679,1686 ----
|
||||||
|
#define elf_aarch64_section_data(sec) \
|
||||||
|
((_aarch64_elf_section_data *) elf_section_data (sec))
|
||||||
|
|
||||||
|
! /* The size of the thread control block which is defined to be two pointers. */
|
||||||
|
! #define TCB_SIZE (ARCH_SIZE/8)*2
|
||||||
|
|
||||||
|
struct elf_aarch64_local_symbol
|
||||||
|
{
|
||||||
|
*************** elfNN_aarch64_final_link_relocate (reloc
|
||||||
|
*** 3589,3595 ****
|
||||||
|
|
||||||
|
if (globals->root.splt != NULL)
|
||||||
|
{
|
||||||
|
! plt_index = h->plt.offset / globals->plt_entry_size - 1;
|
||||||
|
off = (plt_index + 3) * GOT_ENTRY_SIZE;
|
||||||
|
base_got = globals->root.sgotplt;
|
||||||
|
}
|
||||||
|
--- 3589,3596 ----
|
||||||
|
|
||||||
|
if (globals->root.splt != NULL)
|
||||||
|
{
|
||||||
|
! plt_index = ((h->plt.offset - globals->plt_header_size) /
|
||||||
|
! globals->plt_entry_size);
|
||||||
|
off = (plt_index + 3) * GOT_ENTRY_SIZE;
|
||||||
|
base_got = globals->root.sgotplt;
|
||||||
|
}
|
||||||
|
*************** elfNN_aarch64_finish_dynamic_symbol (bfd
|
||||||
|
*** 6823,6829 ****
|
||||||
|
+ htab->root.sgot->output_offset
|
||||||
|
+ (h->got.offset & ~(bfd_vma) 1));
|
||||||
|
|
||||||
|
! if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
|
||||||
|
{
|
||||||
|
if (!h->def_regular)
|
||||||
|
return FALSE;
|
||||||
|
--- 6824,6857 ----
|
||||||
|
+ htab->root.sgot->output_offset
|
||||||
|
+ (h->got.offset & ~(bfd_vma) 1));
|
||||||
|
|
||||||
|
! if (h->def_regular
|
||||||
|
! && h->type == STT_GNU_IFUNC)
|
||||||
|
! {
|
||||||
|
! if (info->shared)
|
||||||
|
! {
|
||||||
|
! /* Generate R_AARCH64_GLOB_DAT. */
|
||||||
|
! goto do_glob_dat;
|
||||||
|
! }
|
||||||
|
! else
|
||||||
|
! {
|
||||||
|
! asection *plt;
|
||||||
|
!
|
||||||
|
! if (!h->pointer_equality_needed)
|
||||||
|
! abort ();
|
||||||
|
!
|
||||||
|
! /* For non-shared object, we can't use .got.plt, which
|
||||||
|
! contains the real function address if we need pointer
|
||||||
|
! equality. We load the GOT entry with the PLT entry. */
|
||||||
|
! plt = htab->root.splt ? htab->root.splt : htab->root.iplt;
|
||||||
|
! bfd_put_NN (output_bfd, (plt->output_section->vma
|
||||||
|
! + plt->output_offset
|
||||||
|
! + h->plt.offset),
|
||||||
|
! htab->root.sgot->contents
|
||||||
|
! + (h->got.offset & ~(bfd_vma) 1));
|
||||||
|
! return TRUE;
|
||||||
|
! }
|
||||||
|
! }
|
||||||
|
! else if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
|
||||||
|
{
|
||||||
|
if (!h->def_regular)
|
||||||
|
return FALSE;
|
||||||
|
*************** elfNN_aarch64_finish_dynamic_symbol (bfd
|
||||||
|
*** 6836,6841 ****
|
||||||
|
--- 6864,6870 ----
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
+ do_glob_dat:
|
||||||
|
BFD_ASSERT ((h->got.offset & 1) == 0);
|
||||||
|
bfd_put_NN (output_bfd, (bfd_vma) 0,
|
||||||
|
htab->root.sgot->contents + h->got.offset);
|
@ -17,7 +17,7 @@
|
|||||||
Summary: A GNU collection of binary utilities
|
Summary: A GNU collection of binary utilities
|
||||||
Name: %{?cross}binutils%{?_with_debug:-debug}
|
Name: %{?cross}binutils%{?_with_debug:-debug}
|
||||||
Version: 2.24
|
Version: 2.24
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
URL: http://sources.redhat.com/binutils
|
URL: http://sources.redhat.com/binutils
|
||||||
@ -49,6 +49,8 @@ Patch12: binutils-2.23.2-kernel-ld-r.patch
|
|||||||
Patch13: binutils-2.23.2-aarch64-em.patch
|
Patch13: binutils-2.23.2-aarch64-em.patch
|
||||||
# Fix building opcodes library with -Werror=format-security
|
# Fix building opcodes library with -Werror=format-security
|
||||||
Patch14: binutils-2.24-s390-mkopc.patch
|
Patch14: binutils-2.24-s390-mkopc.patch
|
||||||
|
# Import fixes for IFUNC and PLT handling for AArch64.
|
||||||
|
Patch15: binutils-2.24-elfnn-aarch64.patch
|
||||||
|
|
||||||
Provides: bundled(libiberty)
|
Provides: bundled(libiberty)
|
||||||
|
|
||||||
@ -165,6 +167,7 @@ using libelf instead of BFD.
|
|||||||
%patch12 -p0 -b .kernel-ld-r~
|
%patch12 -p0 -b .kernel-ld-r~
|
||||||
%patch13 -p0 -b .aarch64~
|
%patch13 -p0 -b .aarch64~
|
||||||
%patch14 -p0 -b .mkopc~
|
%patch14 -p0 -b .mkopc~
|
||||||
|
%patch15 -p0 -b .elf-aarch64~
|
||||||
|
|
||||||
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
|
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
|
||||||
|
|
||||||
@ -470,6 +473,9 @@ exit 0
|
|||||||
%endif # %{isnative}
|
%endif # %{isnative}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 17 2013 Nick Clifton <nickc@redhat.com> - 2.24-9
|
||||||
|
- Import fixes on 2.24 branch that affect AArch64 IFUNC and PLT handling.
|
||||||
|
|
||||||
* Thu Dec 05 2013 Nick Clifton <nickc@redhat.com> - 2.24-8
|
* Thu Dec 05 2013 Nick Clifton <nickc@redhat.com> - 2.24-8
|
||||||
- Fix building opcodes library with -Werror=format-security. (#1037026)
|
- Fix building opcodes library with -Werror=format-security. (#1037026)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user