blob: 712df6dd8fcd82854c8cd58e0d867499d66fdc04 [file] [log] [blame]
wdenk7ebf7442002-11-02 23:17:16 +00001/*
2 * (C) Copyright 2001
3 * Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk7ebf7442002-11-02 23:17:16 +00006 */
7
8/*
9 * u-boot.lds - linker script for U-Boot on the Galileo Eval Board.
10 */
11
12OUTPUT_ARCH(powerpc)
Wolfgang Denke2c2a952010-11-25 12:14:07 +010013
wdenk7ebf7442002-11-02 23:17:16 +000014SECTIONS
15{
16 /* Read-only sections, merged into text segment: */
wdenk7ebf7442002-11-02 23:17:16 +000017 .text :
18 {
Wolfgang Denke2c2a952010-11-25 12:14:07 +010019 arch/powerpc/cpu/74xx_7xx/start.o (.text*)
20 *(.text*)
wdenk7ebf7442002-11-02 23:17:16 +000021
Wolfgang Denke2c2a952010-11-25 12:14:07 +010022 . = DEFINED(env_offset) ? env_offset : .;
23 common/env_embedded.o (.ppcenv*)
wdenk7ebf7442002-11-02 23:17:16 +000024 }
25 _etext = .;
26 PROVIDE (etext = .);
27 .rodata :
28 {
Trent Piephof62fb992009-02-18 15:22:05 -080029 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
wdenk7ebf7442002-11-02 23:17:16 +000030 }
wdenk7ebf7442002-11-02 23:17:16 +000031
32 /* Read-write section, merged into data segment: */
33 . = (. + 0x00FF) & 0xFFFFFF00;
34 _erotext = .;
35 PROVIDE (erotext = .);
36 .reloc :
37 {
wdenk7ebf7442002-11-02 23:17:16 +000038 _GOT2_TABLE_ = .;
Wolfgang Denke2c2a952010-11-25 12:14:07 +010039 KEEP(*(.got2))
Joakim Tjernlund9d8fbd12011-04-20 14:22:59 +020040 KEEP(*(.got))
41 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
wdenk7ebf7442002-11-02 23:17:16 +000042 _FIXUP_TABLE_ = .;
Wolfgang Denke2c2a952010-11-25 12:14:07 +010043 KEEP(*(.fixup))
wdenk7ebf7442002-11-02 23:17:16 +000044 }
Joakim Tjernlund9d8fbd12011-04-20 14:22:59 +020045 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
wdenk7ebf7442002-11-02 23:17:16 +000046 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
47
48 .data :
49 {
Wolfgang Denke2c2a952010-11-25 12:14:07 +010050 *(.data*)
51 *(.sdata*)
wdenk7ebf7442002-11-02 23:17:16 +000052 }
53 _edata = .;
54 PROVIDE (edata = .);
55
Wolfgang Denk807d5d72005-08-31 12:28:00 +020056 . = .;
wdenk8bde7f72003-06-27 21:31:46 +000057
Marek Vasut55675142012-10-12 10:27:03 +000058 . = ALIGN(4);
59 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000060 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000061 }
62
wdenk8bde7f72003-06-27 21:31:46 +000063
Wolfgang Denk807d5d72005-08-31 12:28:00 +020064 . = .;
wdenk7ebf7442002-11-02 23:17:16 +000065 __start___ex_table = .;
66 __ex_table : { *(__ex_table) }
67 __stop___ex_table = .;
68
69 . = ALIGN(256);
70 __init_begin = .;
71 .text.init : { *(.text.init) }
72 .data.init : { *(.data.init) }
73 . = ALIGN(256);
74 __init_end = .;
75
76 __bss_start = .;
Wolfgang Denk64134f02008-01-12 20:31:39 +010077 .bss (NOLOAD) :
wdenk7ebf7442002-11-02 23:17:16 +000078 {
Wolfgang Denke2c2a952010-11-25 12:14:07 +010079 *(.bss*)
80 *(.sbss*)
wdenk7ebf7442002-11-02 23:17:16 +000081 *(COMMON)
Selvamuthukumar9b827cf2008-10-16 22:54:03 +053082 . = ALIGN(4);
wdenk7ebf7442002-11-02 23:17:16 +000083 }
Simon Glass3929fb02013-03-14 06:54:53 +000084 __bss_end = . ;
wdenk7ebf7442002-11-02 23:17:16 +000085 PROVIDE (end = .);
86}