| /* |
| * Copyright (C) 2016 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| |
| |
| MEMORY |
| { |
| bl : ORIGIN = 0x08000000, LENGTH = 16K /* one block */ |
| eedata : ORIGIN = 0x08004000, LENGTH = 32K /* two 16K blocks */ |
| code : ORIGIN = 0x0800C000, LENGTH = 80K /* 16K block + 64K block */ |
| shared : ORIGIN = 0x08020000, LENGTH = 384K /* 3x 128K blocks */ |
| ram : ORIGIN = 0x20000000, LENGTH = 96K |
| } |
| |
| SECTIONS |
| { |
| /* bootloader */ |
| .bl : { |
| BL = ABSOLUTE(.); |
| KEEP (*(.blvec) ) ; |
| *(.bltext) *(.bltext.*) ; |
| *(.blrodata) *(.blrodata.*) ; |
| . = ALIGN(4); |
| __pubkeys_start = ABSOLUTE(.); |
| KEEP (*(.pubkeys) ) ; |
| __pubkeys_end = ABSOLUTE(.); |
| . = ALIGN(4); |
| } > bl = 0xff |
| |
| /* initial EEDATA contents */ |
| .eedata : { |
| |
| . = ALIGN(4); |
| KEEP (*(.eedata) ) ; |
| . = 32767; /* make sure it is all full of 0xFFs */ |
| BYTE (0xff) ; |
| |
| } > eedata = 0xff |
| |
| |
| /* things that live in the main app image */ |
| .text : { |
| KEEP (*(.vectors) ) ; |
| *(.text) *(.text.*) ; |
| *(.rodata) *(.rodata.*) ; |
| . = ALIGN(8); |
| __internal_app_start = ABSOLUTE(.); |
| KEEP (*(.internal_app_init) ) ; |
| __internal_app_end = ABSOLUTE(.); |
| . = ALIGN(4); |
| } > code = 0xff |
| |
| .data : { |
| . = ALIGN(4); |
| __data_start = ABSOLUTE(.); |
| *(.data); |
| *(.data.*); |
| . = ALIGN(4); |
| __data_end = ABSOLUTE(.); |
| } > ram AT > code |
| |
| .bss : { |
| . = ALIGN(4); |
| __bss_start = ABSOLUTE(.); |
| *(.bss) *(.bss.*) *(COMMON); |
| . = ALIGN(4); |
| __bss_end = ABSOLUTE(.); |
| } > ram |
| |
| .neverinit : { |
| . = ALIGN(4); |
| *(.neverinit) *(.neverinit.*) ; |
| . = ALIGN(4); |
| } > ram |
| |
| __data_data = LOADADDR(.data); |
| } |
| |
| __ram_start = ORIGIN(ram); |
| __ram_end = ORIGIN(ram) + LENGTH(ram); |
| __stack_top = ORIGIN(ram) + LENGTH(ram); |
| __eedata_start = ORIGIN(eedata); |
| __eedata_end = ORIGIN(eedata) + LENGTH(eedata); |
| __code_start = ORIGIN(code); |
| __code_end = ORIGIN(code) + LENGTH(code); |
| __shared_start = ORIGIN(shared); |
| __shared_end = ORIGIN(shared) + LENGTH(shared); |
| __app_start = __data_data + __data_end - __data_start; |
| |
| ENTRY(__BL_VECTORS) |