aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-2.31/0006-upstream-change-to-garbage-collection-sweep-causes-m.patch
blob: 0c7b95b4db731ef039c062c054c0371467504261 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 1bb6a80a2ae3cff3a3cc8526ec09e60f66b7cb96 Mon Sep 17 00:00:00 2001
From: David Holsgrove <david.holsgrove@xilinx.com>
Date: Wed, 27 Feb 2013 13:56:11 +1000
Subject: [PATCH 06/31] upstream change to garbage collection sweep causes mb
 regression

Upstream change for PR13177 now clears the def_regular during gc_sweep of a
section. (All other archs in binutils/bfd/elf32-*.c received an update
to a warning about unresolvable relocations - this warning is not present
in binutils/bfd/elf32-microblaze.c, but this warning check would not
prevent the error being seen)

The visible issue with this change is when running a c++ application
in Petalinux which links libstdc++.so for exception handling it segfaults
on execution.

This does not occur if static linking libstdc++.a, so its during the
relocations for a shared lib with garbage collection this occurs

Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Signed-off-by: Nagaraju Mekala <nagaraju.mekala@xilinx.com>
---
 bfd/elflink.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/bfd/elflink.c b/bfd/elflink.c
index b24fb95..b316149 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -6172,7 +6172,6 @@ elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data)
 
       inf = (struct elf_gc_sweep_symbol_info *) data;
       (*inf->hide_symbol) (inf->info, h, TRUE);
-      h->def_regular = 0;
       h->ref_regular = 0;
       h->ref_regular_nonweak = 0;
     }
-- 
2.7.4