python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / binutils / 2.26.1 / 0901-Fix-assertion-reduce-number-of-messages-about-FDE-en.patch
bloba490780f7eaa55a4c0ae1671a6a39ab8a81190d0
1 From 39c481c2fb0e7fb127a15facf70b55d517462809 Mon Sep 17 00:00:00 2001
2 From: Romain Naour <romain.naour@gmail.com>
3 Date: Sat, 6 Feb 2016 00:35:31 +0100
4 Subject: [PATCH 901/901] Fix assertion, reduce number of messages about FDE
5 encoding
7 Patch by Nick Clifton [1]
9 [1] https://sourceware.org/bugzilla/show_bug.cgi?id=19405
11 Signed-off-by: Romain Naour <romain.naour@gmail.com>
12 ---
13 bfd/elf-eh-frame.c | 17 ++++++++++++++---
14 bfd/elf32-nios2.c | 4 ++--
15 2 files changed, 16 insertions(+), 5 deletions(-)
17 diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
18 index e303189..e79bff0 100644
19 --- a/bfd/elf-eh-frame.c
20 +++ b/bfd/elf-eh-frame.c
21 @@ -1369,14 +1369,25 @@ _bfd_elf_discard_section_eh_frame
22 && ent->make_relative == 0)
23 || (ent->fde_encoding & 0x70) == DW_EH_PE_aligned))
25 + static int num_warnings_issued = 0;
26 /* If a shared library uses absolute pointers
27 which we cannot turn into PC relative,
28 don't create the binary search table,
29 since it is affected by runtime relocations. */
30 hdr_info->u.dwarf.table = FALSE;
31 - (*info->callbacks->einfo)
32 - (_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr"
33 - " table being created.\n"), abfd, sec);
34 + if (num_warnings_issued < 10)
35 + {
36 + (*info->callbacks->einfo)
37 + (_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr"
38 + " table being created.\n"), abfd, sec);
39 + num_warnings_issued ++;
40 + }
41 + else if (num_warnings_issued == 10)
42 + {
43 + (*info->callbacks->einfo)
44 + (_("%P: Further warnings about FDE encoding preventing .eh_frame_hdr generation dropped.\n"));
45 + num_warnings_issued ++;
46 + }
48 ent->removed = 0;
49 hdr_info->u.dwarf.fde_count++;
50 diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
51 index 01ebd6e..d1b7f83 100644
52 --- a/bfd/elf32-nios2.c
53 +++ b/bfd/elf32-nios2.c
54 @@ -1905,8 +1905,8 @@ nios2_elf32_install_imm16 (asection *sec, bfd_vma offset, bfd_vma value)
56 bfd_vma word = bfd_get_32 (sec->owner, sec->contents + offset);
58 - BFD_ASSERT(value <= 0xffff);
60 + BFD_ASSERT (value <= 0xffff || ((bfd_signed_vma) value) >= -0xffff);
62 bfd_put_32 (sec->owner, word | ((value & 0xffff) << 6),
63 sec->contents + offset);
65 --
66 2.4.3