f8d0d28bf9
- Rebase patches from 2.25 on top of 2.26. - Use git format for patches - remove upstreamed xtensa patches The first patch [1] is needed to be able to build glibc with binutils 2.26 on nios2. The second from [2] fix an assertion issue with ld. [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=a7be2893a6449e64fe6cfcdd8700b0a367a69f19 [2] https://sourceware.org/bugzilla/show_bug.cgi?id=19405 Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
68 lines
2.2 KiB
Diff
68 lines
2.2 KiB
Diff
From 39c481c2fb0e7fb127a15facf70b55d517462809 Mon Sep 17 00:00:00 2001
|
|
From: Romain Naour <romain.naour@gmail.com>
|
|
Date: Sat, 6 Feb 2016 00:35:31 +0100
|
|
Subject: [PATCH 901/901] Fix assertion, reduce number of messages about FDE
|
|
encoding
|
|
|
|
Patch by Nick Clifton [1]
|
|
|
|
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=19405
|
|
|
|
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
|
---
|
|
bfd/elf-eh-frame.c | 17 ++++++++++++++---
|
|
bfd/elf32-nios2.c | 4 ++--
|
|
2 files changed, 16 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
|
|
index e303189..e79bff0 100644
|
|
--- a/bfd/elf-eh-frame.c
|
|
+++ b/bfd/elf-eh-frame.c
|
|
@@ -1369,14 +1369,25 @@ _bfd_elf_discard_section_eh_frame
|
|
&& ent->make_relative == 0)
|
|
|| (ent->fde_encoding & 0x70) == DW_EH_PE_aligned))
|
|
{
|
|
+ static int num_warnings_issued = 0;
|
|
/* If a shared library uses absolute pointers
|
|
which we cannot turn into PC relative,
|
|
don't create the binary search table,
|
|
since it is affected by runtime relocations. */
|
|
hdr_info->u.dwarf.table = FALSE;
|
|
- (*info->callbacks->einfo)
|
|
- (_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr"
|
|
- " table being created.\n"), abfd, sec);
|
|
+ if (num_warnings_issued < 10)
|
|
+ {
|
|
+ (*info->callbacks->einfo)
|
|
+ (_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr"
|
|
+ " table being created.\n"), abfd, sec);
|
|
+ num_warnings_issued ++;
|
|
+ }
|
|
+ else if (num_warnings_issued == 10)
|
|
+ {
|
|
+ (*info->callbacks->einfo)
|
|
+ (_("%P: Further warnings about FDE encoding preventing .eh_frame_hdr generation dropped.\n"));
|
|
+ num_warnings_issued ++;
|
|
+ }
|
|
}
|
|
ent->removed = 0;
|
|
hdr_info->u.dwarf.fde_count++;
|
|
diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
|
|
index 01ebd6e..d1b7f83 100644
|
|
--- a/bfd/elf32-nios2.c
|
|
+++ b/bfd/elf32-nios2.c
|
|
@@ -1905,8 +1905,8 @@ nios2_elf32_install_imm16 (asection *sec, bfd_vma offset, bfd_vma value)
|
|
{
|
|
bfd_vma word = bfd_get_32 (sec->owner, sec->contents + offset);
|
|
|
|
- BFD_ASSERT(value <= 0xffff);
|
|
-
|
|
+ BFD_ASSERT (value <= 0xffff || ((bfd_signed_vma) value) >= -0xffff);
|
|
+
|
|
bfd_put_32 (sec->owner, word | ((value & 0xffff) << 6),
|
|
sec->contents + offset);
|
|
}
|
|
--
|
|
2.4.3
|
|
|