blob: 0f27ed92336a8e96049cf9e610774273875ba313 [file] [log] [blame]
Jordan Crousef6145c32008-03-19 23:56:58 +00001/*
Uwe Hermann661e3802008-03-21 18:37:23 +00002 *
3 * Copyright (C) 2008 Advanced Micro Devices, Inc.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. The name of the author may not be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
Jordan Crousef6145c32008-03-19 23:56:58 +000028
Jordan Crousef6145c32008-03-19 23:56:58 +000029OUTPUT_FORMAT(elf32-i386)
30OUTPUT_ARCH(i386)
31
32ENTRY(_entry)
33
Jordan Crousef6145c32008-03-19 23:56:58 +000034SECTIONS
35{
Stefan Reinauer82184452016-03-12 16:18:17 -080036 . = CONFIG_LP_BASE_ADDRESS;
Jordan Crousef6145c32008-03-19 23:56:58 +000037
38 . = ALIGN(16);
39 _start = .;
40
41 .text : {
Yi Chou32ea2ab2023-11-18 12:12:01 +080042 _text = .;
Jordan Crousef6145c32008-03-19 23:56:58 +000043 *(.text._entry)
44 *(.text)
45 *(.text.*)
Yi Chou32ea2ab2023-11-18 12:12:01 +080046 _etext = .;
Jordan Crousef6145c32008-03-19 23:56:58 +000047 }
48
49 .rodata : {
Yi Chou32ea2ab2023-11-18 12:12:01 +080050 _rodata = .;
Jordan Crousef6145c32008-03-19 23:56:58 +000051 *(.rodata)
52 *(.rodata.*)
Yi Chou32ea2ab2023-11-18 12:12:01 +080053 _erodata = .;
Jordan Crousef6145c32008-03-19 23:56:58 +000054 }
55
56 .data : {
Yi Chou32ea2ab2023-11-18 12:12:01 +080057 _data = .;
Jordan Crousef6145c32008-03-19 23:56:58 +000058 *(.data)
59 *(.data.*)
Yi Chou32ea2ab2023-11-18 12:12:01 +080060 _edata = .;
Jordan Crousef6145c32008-03-19 23:56:58 +000061 }
62
63 .bss : {
Yi Chou32ea2ab2023-11-18 12:12:01 +080064 _bss = .;
Stefan Reinauerf23804b2009-07-18 15:18:22 +000065 *(.sbss)
66 *(.sbss.*)
Jordan Crousef6145c32008-03-19 23:56:58 +000067 *(.bss)
68 *(.bss.*)
69 *(COMMON)
Yi Chou32ea2ab2023-11-18 12:12:01 +080070 _ebss = .;
Jordan Crousef6145c32008-03-19 23:56:58 +000071
72 /* Stack and heap */
73
74 . = ALIGN(16);
75 _heap = .;
Stefan Reinauer82184452016-03-12 16:18:17 -080076 . += CONFIG_LP_HEAP_SIZE;
Jordan Crousef6145c32008-03-19 23:56:58 +000077 . = ALIGN(16);
78 _eheap = .;
79
Yi Chou32ea2ab2023-11-18 12:12:01 +080080 _stack = .;
Stefan Reinauer82184452016-03-12 16:18:17 -080081 . += CONFIG_LP_STACK_SIZE;
Jordan Crousef6145c32008-03-19 23:56:58 +000082 . = ALIGN(16);
Yi Chou32ea2ab2023-11-18 12:12:01 +080083 _estack = .;
Jordan Crousef6145c32008-03-19 23:56:58 +000084 }
85
Jordan Crousef6145c32008-03-19 23:56:58 +000086 _end = .;
87
Gabe Blackb9edbbd2012-04-17 15:59:56 -070088 /DISCARD/ : {
89 *(.comment)
90 *(.note*)
91 }
Jordan Crousef6145c32008-03-19 23:56:58 +000092}