summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-emultempl-elf32.em-gld-EMULATION_NAME-_before_alloca.patch
blob: 36e5924d48a372a61b9490c1540ccc2fdffc3188 (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
41
42
43
From b0d2b7b6eae7b7f4fbfd1695d4d2f1b45198d597 Mon Sep 17 00:00:00 2001
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Fri, 3 May 2013 15:01:19 +0000
Subject: [PATCH] 	* emultempl/elf32.em
 (gld${EMULATION_NAME}_before_allocation): 	Only call
 lang_for_each_statement if an ELF hash table is used.

---
 ld/ChangeLog          |    5 +++++
 ld/emultempl/elf32.em |   12 +++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

2013-05-03  Alan Modra  <amodra@gmail.com>

       * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
       Only call lang_for_each_statement if an ELF hash table is used.

Upstream-Status: Backport

Index: binutils-2.23.2/ld/emultempl/elf32.em
===================================================================
--- binutils-2.23.2.orig/ld/emultempl/elf32.em	2013-06-26 23:35:45.000000000 -0700
+++ binutils-2.23.2/ld/emultempl/elf32.em	2013-06-26 23:37:04.530429733 -0700
@@ -1495,12 +1495,14 @@
   bfd *abfd;
 
   if (is_elf_hash_table (link_info.hash))
-    _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
+    {
+      _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
 
-  /* If we are going to make any variable assignments, we need to let
-     the ELF backend know about them in case the variables are
-     referred to by dynamic objects.  */
-  lang_for_each_statement (gld${EMULATION_NAME}_find_statement_assignment);
+      /* If we are going to make any variable assignments, we need to
+	 let the ELF backend know about them in case the variables are
+	 referred to by dynamic objects.  */
+      lang_for_each_statement (gld${EMULATION_NAME}_find_statement_assignment);
+    }
 
   /* Let the ELF backend work out the sizes of any sections required
      by dynamic linking.  */
OpenPOWER on IntegriCloud