blob: 8c54f761eefde3ae4b4c3797081eb0a7abf98eec [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001From e28b33db95e6b71afe2eaca9d7090b3bfc20f08e Mon Sep 17 00:00:00 2001
2From: Nagaraju <nmekala@xilinx.com>
3Date: Wed, 20 Mar 2019 11:42:07 +0530
4Subject: [PATCH] fixing the _STACK_SIZE issue with the flto flag
5
6Signed-off-by: Nagaraju Mekala <nagaraju.mekala@xilinx.com>
7
8---
9 ld/scripttempl/elfmicroblaze.sc | 12 ++++++------
10 1 file changed, 6 insertions(+), 6 deletions(-)
11
12diff --git a/ld/scripttempl/elfmicroblaze.sc b/ld/scripttempl/elfmicroblaze.sc
13index 30b9c28..6be0f4e 100644
14--- a/ld/scripttempl/elfmicroblaze.sc
15+++ b/ld/scripttempl/elfmicroblaze.sc
16@@ -63,9 +63,9 @@ ${RELOCATING+${LIB_SEARCH_DIRS}}
17
18 ${RELOCATING+ENTRY (${ENTRY})}
19
20-${RELOCATING+_TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x50;
21-_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x0;
22-_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400;}
23+${RELOCATING+_DEF_TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x50;
24+_DEF_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x0;
25+_DEF_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400;}
26
27 SECTIONS
28 {
29@@ -75,7 +75,7 @@ SECTIONS
30 .vectors.debug_sw_break 0x18 : { KEEP (*(.vectors.debug_sw_break)) } = 0
31 .vectors.hw_exception 0x20 : { KEEP (*(.vectors.hw_exception)) } = 0
32
33- ${RELOCATING+. = _TEXT_START_ADDR;}
34+ ${RELOCATING+. = _DEF_TEXT_START_ADDR;}
35
36 ${RELOCATING+ _ftext = .;}
37 .text : {
38@@ -207,7 +207,7 @@ SECTIONS
39 .heap : {
40 ${RELOCATING+ _heap = .;}
41 ${RELOCATING+ _heap_start = .;}
42- ${RELOCATING+ . += _HEAP_SIZE;}
43+ ${RELOCATING+ . += _DEF_HEAP_SIZE;}
44 ${RELOCATING+ _heap_end = .;}
45 }
46
47@@ -215,7 +215,7 @@ SECTIONS
48
49 .stack : {
50 ${RELOCATING+ _stack_end = .;}
51- ${RELOCATING+ . += _STACK_SIZE;}
52+ ${RELOCATING+ . += _DEF_STACK_SIZE;}
53 ${RELOCATING+ . = ALIGN(. != 0 ? 8 : 1);}
54 ${RELOCATING+ _stack = .;}
55 ${RELOCATING+ _end = .;}