[PR 03] SPARC BSPs: workspace must be aligned on a 8-byte boundary
Daniel Hellstrom
daniel at gaisler.com
Thu Feb 2 14:46:24 UTC 2012
The linker-script already declares a 8-byte aligned symbol (_end)
which can be used instead of "variable aligned" symbol end.
Signed-off-by: Daniel Hellstrom <daniel at gaisler.com>
---
c/src/lib/libbsp/sparc/shared/bspgetworkarea.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/c/src/lib/libbsp/sparc/shared/bspgetworkarea.c b/c/src/lib/libbsp/sparc/shared/bspgetworkarea.c
index c6e1491..7172c21 100644
--- a/c/src/lib/libbsp/sparc/shared/bspgetworkarea.c
+++ b/c/src/lib/libbsp/sparc/shared/bspgetworkarea.c
@@ -21,6 +21,7 @@
/* Tells us where to put the workspace in case remote debugger is present. */
extern uint32_t rdb_start;
+extern int _end;
/*
* This method returns the base address and size of the area which
@@ -37,8 +38,8 @@ void bsp_get_work_area(
/* must be identical to STACK_SIZE in start.S */
#define STACK_SIZE (16 * 1024)
- *work_area_start = &end;
- *work_area_size = (void *)rdb_start - (void *)&end - STACK_SIZE;
+ *work_area_start = &_end;
+ *work_area_size = (void *)rdb_start - (void *)&_end - STACK_SIZE;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
--
1.7.0.4
More information about the devel
mailing list