board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / binutils / 2.26.1 / 0904-bfin-fdpic-upstream.patch
blobffbacc4c0e4dd7dc0d861971a8b6df6dce77bb55
1 From ed3056ebdb9795446157af03d3e08fbb93c1b01d Mon Sep 17 00:00:00 2001
2 From: Nick Clifton <nickc@redhat.com>
3 Date: Tue, 29 Mar 2016 10:24:16 +0100
4 Subject: [PATCH] Relax assertion in BFIN linker to allow for discard GOT relocs.
6 PR 17334
7 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
8 assertion on the size of the got section to allow it to be bigger
9 than the number of relocs.
10 diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
11 index 7cc8b6d..b2fcf38 100644
12 --- a/bfd/elf32-bfin.c
13 +++ b/bfd/elf32-bfin.c
14 @@ -4457,7 +4457,13 @@ elf32_bfinfdpic_finish_dynamic_sections (bfd *output_bfd,
15 if (bfinfdpic_got_section (info))
17 BFD_ASSERT (bfinfdpic_gotrel_section (info)->size
18 - == (bfinfdpic_gotrel_section (info)->reloc_count
19 + /* PR 17334: It appears that the GOT section can end up
20 + being bigger than the number of relocs. Presumably
21 + because some relocs have been deleted. A test case has
22 + yet to be generated for verify this, but in the meantime
23 + the test below has been changed from == to >= so that
24 + applications can continue to be built. */
25 + >= (bfinfdpic_gotrel_section (info)->reloc_count
26 * sizeof (Elf32_External_Rel)));
28 if (bfinfdpic_gotfixup_section (info))
29 --
30 1.7.1