UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 20378

6.3 EDK - How do I include _heap_start and _heap_end in the Linker Script?

Description

Keywords: linker, script heap, start, end

Urgency: Standard

General Description:
How do I include _heap_start and _heap_end in the Linker Script? Does the "Generate Linker Script GUI" support those sections?

Solution

The current version of EDK 6.3 SP1 does not support to add the _heap_start and _heap_end section in the Linker Script. They have to be added manually.

The .bss section that includes the heap can look like:

.bss :
{
. = ALIGN(4);
*(.bss)
*(COMMON)
. = ALIGN(4);
__bss_end = .;

/* add stack and align to 16 byte boundary */
. = . + _STACK_SIZE;
. = ALIGN(16);
__stack = .;

/* add heap and align to 16 byte boundary */
_heap_start = .;
. = . + _HEAP_SIZE;
. = ALIGN(16);
_heap_end = .;

} > dsocm : hdr3
AR# 20378
Date Created 11/15/2004
Last Updated 04/12/2007
Status Archive
Type General Article