From 0546e65ec248aa6c8c217516886babca03da3f75 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 31 May 2016 09:12:43 +0200 Subject: bsps: Add defines for some linker subsections The GNU ld sort by name or alignment needs distinct input sections. --- c/src/lib/libbsp/arm/shared/include/linker-symbols.h | 8 +++++++- c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h | 11 ++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/c/src/lib/libbsp/arm/shared/include/linker-symbols.h b/c/src/lib/libbsp/arm/shared/include/linker-symbols.h index a4df81ab71..7446259568 100644 --- a/c/src/lib/libbsp/arm/shared/include/linker-symbols.h +++ b/c/src/lib/libbsp/arm/shared/include/linker-symbols.h @@ -7,7 +7,7 @@ */ /* - * Copyright (c) 2008-2015 embedded brains GmbH. All rights reserved. + * Copyright (c) 2008, 2016 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 @@ -144,8 +144,14 @@ LINKER_SYMBOL(bsp_translation_table_end) #define BSP_NOCACHE_SECTION __attribute__((section(".bsp_nocache"))) +#define BSP_NOCACHE_SUBSECTION(subsection) \ + __attribute__((section(".bsp_nocache." # subsection))) + #define BSP_NOCACHENOLOAD_SECTION __attribute__((section(".bsp_noload_nocache"))) +#define BSP_NOCACHENOLOAD_SUBSECTION(subsection) \ + __attribute__((section(".bsp_noload_nocache." # subsection))) + LINKER_SYMBOL(bsp_processor_count) /** @} */ diff --git a/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h b/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h index 06f11655f6..de7a6c483d 100644 --- a/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h +++ b/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h @@ -7,7 +7,7 @@ */ /* - * Copyright (c) 2010-2015 embedded brains GmbH. All rights reserved. + * Copyright (c) 2010, 2016 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 @@ -117,10 +117,19 @@ LINKER_SYMBOL(bsp_section_nvram_size) #define BSP_NOCACHE_SECTION __attribute__((section(".bsp_nocache"))) +#define BSP_NOCACHE_SUBSECTION(subsection) \ + __attribute__((section(".bsp_nocache." # subsection))) + #define BSP_NOCACHENOLOAD_SECTION __attribute__((section(".bsp_noload_nocache"))) +#define BSP_NOCACHENOLOAD_SUBSECTION(subsection) \ + __attribute__((section(".bsp_noload_nocache." # subsection))) + #define BSP_NVRAM_SECTION __attribute__((section(".bsp_nvram"))) +#define BSP_NVRAM_SUBSECTION(subsection) \ + __attribute__((section(".bsp_nvram." # subsection))) + /** @} */ #ifdef __cplusplus -- cgit v1.2.3