aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-2.31/0031-fixing-the-_STACK_SIZE-issue-with-the-flto-flag.patch
blob: d47b59a9ff065d1bcb27ae8ff054a2aa5d58290b (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From 8c08e0dfcfcb6c56576b68f235b0006c4c67fafb Mon Sep 17 00:00:00 2001
From: Nagaraju <nmekala@xilinx.com>
Date: Wed, 20 Mar 2019 11:42:07 +0530
Subject: [PATCH 31/31] fixing the _STACK_SIZE issue with the flto flag

Signed-off-by: Nagaraju Mekala <nagaraju.mekala@xilinx.com>
---
 ld/scripttempl/elfmicroblaze.sc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ld/scripttempl/elfmicroblaze.sc b/ld/scripttempl/elfmicroblaze.sc
index d8f7569..1316901 100644
--- a/ld/scripttempl/elfmicroblaze.sc
+++ b/ld/scripttempl/elfmicroblaze.sc
@@ -63,9 +63,9 @@ ${RELOCATING+${LIB_SEARCH_DIRS}}
 
 ${RELOCATING+ENTRY (${ENTRY})}
 
-_TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x50;
-_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x0;
-_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400;
+_DEF_TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x50;
+_DEF_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x0;
+_DEF_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400;
 
 SECTIONS
 {
@@ -75,7 +75,7 @@ SECTIONS
   .vectors.debug_sw_break 0x18 : { KEEP (*(.vectors.debug_sw_break)) } = 0
   .vectors.hw_exception 0x20 : { KEEP (*(.vectors.hw_exception)) } = 0
 
-  ${RELOCATING+. = _TEXT_START_ADDR;}
+  ${RELOCATING+. = _DEF_TEXT_START_ADDR;}
 
   ${RELOCATING+ _ftext  =  .;}
   .text : {
@@ -208,7 +208,7 @@ SECTIONS
   .heap : {
     ${RELOCATING+ _heap = .;}
     ${RELOCATING+ _heap_start = .;}
-    ${RELOCATING+ . += _HEAP_SIZE;}
+    ${RELOCATING+ . += _DEF_HEAP_SIZE;}
     ${RELOCATING+ _heap_end = .;}
   }
 
@@ -216,7 +216,7 @@ SECTIONS
 
   .stack : {
     ${RELOCATING+ _stack_end = .;}
-    ${RELOCATING+ . += _STACK_SIZE;}
+    ${RELOCATING+ . += _DEF_STACK_SIZE;}
     ${RELOCATING+ . = ALIGN(. != 0 ? 8 : 1);}
     ${RELOCATING+ _stack = .;}
     ${RELOCATING+ _end = .;}
-- 
2.7.4