1;/*
2; * Copyright (c) 2021-2024 Arm Limited. All rights reserved.
3; *
4; * Licensed under the Apache License, Version 2.0 (the "License");
5; * you may not use this file except in compliance with the License.
6; * You may obtain a copy of the License at
7; *
8; *     http://www.apache.org/licenses/LICENSE-2.0
9; *
10; * Unless required by applicable law or agreed to in writing, software
11; * distributed under the License is distributed on an "AS IS" BASIS,
12; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13; * See the License for the specific language governing permissions and
14; * limitations under the License.
15; *
16; *
17; * This file is derivative of CMSIS V5.00 gcc_arm.ld
18; */
19
20/* Linker script to configure memory regions. */
21/* This file will be run trough the pre-processor. */
22
23#include "region_defs.h"
24
25MEMORY
26{
27    CODE (rx) : ORIGIN = PROVISIONING_BUNDLE_CODE_START, LENGTH = PROVISIONING_BUNDLE_CODE_SIZE
28    DATA (rw) : ORIGIN = PROVISIONING_BUNDLE_DATA_START, LENGTH = PROVISIONING_BUNDLE_DATA_SIZE
29    VALUES (r) : ORIGIN = PROVISIONING_BUNDLE_VALUES_START, LENGTH = PROVISIONING_BUNDLE_VALUES_SIZE
30}
31
32ENTRY(do_provisioning)
33
34SECTIONS
35{
36    CODE :
37    {
38        *provisioning_code.o(DO_PROVISION)
39        *(.text*)
40    } > CODE
41
42    RW_DATA :
43    {
44        *(COMMON .data*)
45    } > DATA
46
47    RO_DATA :
48    {
49        *(EXCLUDE_FILE (*provisioning_data.o) .rodata*)
50    } > DATA
51
52    BSS_DATA :
53    {
54        *(.bss*)
55    } > DATA
56
57    VALUES :
58    {
59        *provisioning_data.o(.rodata.data)
60    } > VALUES
61
62}
63