ARC: MWDT: workaround for libs with stackcheck

As of today we have libraries provided by MWDT build with
stackcheck enabled. So we have to provide dummy
_fstack, _estack to make it working.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This commit is contained in:
Evgeniy Paltsev 2021-06-03 14:32:31 +03:00 committed by Christopher Friedt
commit 0900d9e972

View file

@ -224,6 +224,16 @@ SECTIONS {
__kernel_ram_end = .;
__kernel_ram_size = __kernel_ram_end - __kernel_ram_start;
#ifdef __MWDT_LINKER_CMD__
/* mwdt requires _fstack, _estack which will be used in _stkchk.
* _stkchk is inserted by mwdt automatically, if _fstack, _estack is not
* set correctly, the brk_s instruction will be called
* here, we use a trick to deceive the compiler.
*/
_fstack = _image_ram_start;
_estack = .;
#endif /* __MWDT_LINKER_CMD__ */
GROUP_END(RAMABLE_REGION)
/* Located in generated directory. This file is populated by the