Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
angelo@sysam.it | 6312a95 | 2015-03-29 22:54:16 +0200 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2000 |
| 4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 5 | * (C) Copyright 2015 |
| 6 | * Angelo Dureghello, Sysam Firmware, angelo@sysam.it |
angelo@sysam.it | 6312a95 | 2015-03-29 22:54:16 +0200 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <config.h> |
| 10 | |
| 11 | OUTPUT_ARCH(m68k) |
Tom Rini | 0d40467 | 2021-09-17 12:05:20 -0400 | [diff] [blame] | 12 | ENTRY(_start) |
angelo@sysam.it | 6312a95 | 2015-03-29 22:54:16 +0200 | [diff] [blame] | 13 | |
| 14 | #ifndef LDS_BOARD_TEXT |
| 15 | #define LDS_BOARD_TEXT |
| 16 | #endif |
| 17 | |
| 18 | SECTIONS |
| 19 | { |
| 20 | .text : |
| 21 | { |
| 22 | CPUDIR/start.o (.text*) |
| 23 | LDS_BOARD_TEXT |
| 24 | |
| 25 | *(.text*) |
| 26 | } |
| 27 | _etext = .; |
| 28 | PROVIDE (etext = .); |
| 29 | .rodata : |
| 30 | { |
| 31 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 32 | } |
| 33 | |
| 34 | /* Read-write section, merged into data segment: */ |
| 35 | . = (. + 0x00FF) & 0xFFFFFF00; |
| 36 | _erotext = .; |
| 37 | PROVIDE (erotext = .); |
| 38 | |
| 39 | .reloc : |
| 40 | { |
| 41 | __got_start = .; |
| 42 | KEEP(*(.got)) |
| 43 | __got_end = .; |
| 44 | _GOT2_TABLE_ = .; |
| 45 | KEEP(*(.got2)) |
| 46 | _FIXUP_TABLE_ = .; |
| 47 | KEEP(*(.fixup)) |
| 48 | } |
| 49 | __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |
| 50 | __fixup_entries = (. - _FIXUP_TABLE_)>>2; |
| 51 | |
| 52 | .data : |
| 53 | { |
| 54 | *(.data*) |
| 55 | *(.sdata*) |
| 56 | } |
| 57 | _edata = .; |
| 58 | PROVIDE (edata = .); |
| 59 | |
| 60 | . = .; |
| 61 | |
| 62 | . = ALIGN(4); |
| 63 | .u_boot_list : { |
| 64 | KEEP(*(SORT(.u_boot_list*))); |
| 65 | } |
| 66 | |
| 67 | . = .; |
| 68 | __start___ex_table = .; |
| 69 | __ex_table : { *(__ex_table) } |
| 70 | __stop___ex_table = .; |
| 71 | |
Angelo Dureghello | 605bfd3 | 2019-03-13 21:46:42 +0100 | [diff] [blame] | 72 | . = ALIGN(4); |
angelo@sysam.it | 6312a95 | 2015-03-29 22:54:16 +0200 | [diff] [blame] | 73 | __init_begin = .; |
| 74 | .text.init : { *(.text.init) } |
| 75 | .data.init : { *(.data.init) } |
Angelo Dureghello | 605bfd3 | 2019-03-13 21:46:42 +0100 | [diff] [blame] | 76 | . = ALIGN(4); |
angelo@sysam.it | 6312a95 | 2015-03-29 22:54:16 +0200 | [diff] [blame] | 77 | __init_end = .; |
| 78 | |
Angelo Dureghello | 605bfd3 | 2019-03-13 21:46:42 +0100 | [diff] [blame] | 79 | _end = .; |
| 80 | |
angelo@sysam.it | 6312a95 | 2015-03-29 22:54:16 +0200 | [diff] [blame] | 81 | __bss_start = .; |
| 82 | .bss (NOLOAD) : |
| 83 | { |
| 84 | _sbss = .; |
| 85 | *(.bss*) |
| 86 | *(.sbss*) |
| 87 | *(COMMON) |
| 88 | . = ALIGN(4); |
| 89 | _ebss = .; |
| 90 | } |
| 91 | __bss_end = . ; |
| 92 | PROVIDE (end = .); |
| 93 | } |