changeset 3010:843c497ed312

* src/cortexm.ld: Add USER_SECTION() macro. [ Bugzilla 1001142 ]
author jld
date Thu, 17 Feb 2011 14:18:40 +0000
parents 9ba76199bff2
children 36c17db474c0
files packages/hal/cortexm/arch/current/ChangeLog packages/hal/cortexm/arch/current/src/cortexm.ld
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/hal/cortexm/arch/current/ChangeLog
+++ b/packages/hal/cortexm/arch/current/ChangeLog
@@ -5,6 +5,10 @@ 2011-02-17  John Dallaway  <john@dallawa
 	reported by both Ulrich Holeschak and Stanislav Meduna.
 	[ Bugzilla 1001154 ]
 
+2011-02-16  Ilija Kocho <ilijak@siva.com.mk>
+
+	* src/cortexm.ld: Added USER_SECTION() macro. [Bugzilla 1001142 ]
+
 2011-01-20  Christophe Coutand  <ccoutand@stmi.com>
 
 	* include/hal_intr.h:
--- a/packages/hal/cortexm/arch/current/src/cortexm.ld
+++ b/packages/hal/cortexm/arch/current/src/cortexm.ld
@@ -6,7 +6,7 @@
 // ####ECOSGPLCOPYRIGHTBEGIN####                                            
 // -------------------------------------------                              
 // This file is part of eCos, the Embedded Configurable Operating System.   
-// Copyright (C) 2008 Free Software Foundation, Inc.                        
+// Copyright (C) 2008, 2011 Free Software Foundation, Inc.                        
 //
 // eCos is free software; you can redistribute it and/or modify it under    
 // the terms of the GNU General Public License as published by the Free     
@@ -266,6 +266,13 @@ OUTPUT_FORMAT(elf32-bigarm)
     __bss_end = ABSOLUTE (.); } \
     > _region_
 
+#define USER_SECTION(_name_, _region_,  _vma_, _lma_) \
+    ._name_ _vma_ : _lma_ \
+    { __ ## _name_ ## _start = ABSOLUTE (.); \
+     *(._name_*) \
+    __ ## _name_ ## _end = ABSOLUTE (.); } \
+    > _region_
+
 #define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);
 
 #include <pkgconf/hal_cortexm.h>