python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / binutils / 2.25.1 / 916-microblaze-pr21180.patch
blob2ffae49f6249679ca801c9e08cc8a0e697f58d01
1 Fix ld segfault for microblaze when --gc-sections is used
2 Upstream: pending
3 https://sourceware.org/bugzilla/show_bug.cgi?id=21180
5 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
7 diff -Nur binutils-2.25.1.orig/bfd/elf32-microblaze.c binutils-2.25.1/bfd/elf32-microblaze.c
8 --- binutils-2.25.1.orig/bfd/elf32-microblaze.c 2015-07-21 10:20:58.000000000 +0200
9 +++ binutils-2.25.1/bfd/elf32-microblaze.c 2017-02-23 19:43:24.560776208 +0100
10 @@ -3297,13 +3297,20 @@
11 && h->def_regular)
13 asection *sec = h->root.u.def.section;
14 + bfd_vma value;
16 + value = h->root.u.def.value;
17 + if (sec->output_section != NULL)
18 + /* PR 21180: If the output section is NULL, then the symbol is no
19 + longer needed, and in theory the GOT entry is redundant. But
20 + it is too late to change our minds now... */
21 + value += sec->output_section->vma + sec->output_offset;
23 microblaze_elf_output_dynamic_relocation (output_bfd,
24 srela, srela->reloc_count++,
25 /* symindex= */ 0,
26 R_MICROBLAZE_REL, offset,
27 - h->root.u.def.value
28 - + sec->output_section->vma
29 - + sec->output_offset);
30 + value);
32 else