summaryrefslogtreecommitdiff
path: root/arch/arm/lpc17xx/ldscript-mpu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/lpc17xx/ldscript-mpu')
-rw-r--r--arch/arm/lpc17xx/ldscript-mpu30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/lpc17xx/ldscript-mpu b/arch/arm/lpc17xx/ldscript-mpu
index 0f8fe23..ce71313 100644
--- a/arch/arm/lpc17xx/ldscript-mpu
+++ b/arch/arm/lpc17xx/ldscript-mpu
@@ -49,6 +49,7 @@ SECTIONS
{
CREATE_OBJECT_SYMBOLS
__cs3_region_start_rom = .;
+ __privileged_code_start__ = . ;
*(.cs3.region-head.rom)
__cs3_interrupt_vector = __cs3_interrupt_vector_cortex_m;
@@ -62,6 +63,20 @@ SECTIONS
*(.cs3.reset)
/* Make sure we pulled in some reset code. */
ASSERT (. != __cs3_reset, "No reset code");
+
+ *( .privileged_code )
+ *( .privileged_functions )
+
+ __privileged_code_end___len = . - __privileged_code_start__ - 1 ;
+ __privileged_code_end___len |= __privileged_code_end___len >> 1 ;
+ __privileged_code_end___len |= __privileged_code_end___len >> 2 ;
+ __privileged_code_end___len |= __privileged_code_end___len >> 4 ;
+ __privileged_code_end___len |= __privileged_code_end___len >> 8 ;
+ __privileged_code_end___len |= __privileged_code_end___len >> 16 ;
+ . = ALIGN( MAX( __privileged_code_end___len + 1, 32 ) ) ;
+
+ __privileged_code_end__ = .;
+ __privileged_functions_end__ = .;
*(.text .text.* .gnu.linkonce.t.*)
*(.plt)
@@ -133,6 +148,21 @@ SECTIONS
__cs3_region_size_rom = LENGTH(rom);
__cs3_region_num = 1;
+ .privileged_data :
+ {
+ __privileged_data_start__ = .;
+ *(.priviledge_data)
+ __privileged_data_end___len = . - __privileged_data_start__ - 1 ;
+ __privileged_data_end___len |= __privileged_data_end___len >> 1 ;
+ __privileged_data_end___len |= __privileged_data_end___len >> 2 ;
+ __privileged_data_end___len |= __privileged_data_end___len >> 4 ;
+ __privileged_data_end___len |= __privileged_data_end___len >> 8 ;
+ __privileged_data_end___len |= __privileged_data_end___len >> 16 ;
+ . = ALIGN( MAX( __privileged_data_end___len + 1, 32 ) ) ;
+
+ __privileged_data_end__ = .;
+ } >ram
+
.data :
{
__cs3_region_start_ram = .;