diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-01-24 07:30:25 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-01-24 07:30:25 +0100 |
commit | 6a6e8752bdf9b7c11921c502f2433b8fdbf0c525 (patch) | |
tree | 8bed7ec753bb927edcf5d87bbdd0e33428dd9e2f /arch | |
parent | 1b108126c12b97c379a899bc3d2dba1b65ef59df (diff) |
Adding privileged segments support in ldscript.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/lpc17xx/ldscript-mpu | 30 |
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 = .; |