1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * (C) Copyright 2002 4 * Daniel Engstr��m, Omicron Ceti AB, daniel@omicron.se. 5 */ 6 7#include <config.h> 8OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") 9OUTPUT_ARCH(i386) 10ENTRY(_start) 11 12SECTIONS 13{ 14 . = IMAGE_TEXT_BASE; /* Location of bootcode in flash */ 15 __text_start = .; 16 .text : { 17 __image_copy_start = .; 18 *(.text*); 19 } 20 21 . = ALIGN(4); 22 23 . = ALIGN(4); 24 __u_boot_list : { 25 KEEP(*(SORT(__u_boot_list*))); 26 } 27 28 . = ALIGN(4); 29 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } 30 31 . = ALIGN(4); 32 33 .priv_data : { 34 __priv_data_start = .; 35 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.priv_data*))) 36 __priv_data_end = .; 37 } 38 39 . = ALIGN(4); 40 .data : { *(.data*) } 41 42 . = ALIGN(4); 43 __data_end = .; 44 __init_end = .; 45 . = ALIGN(4); 46 .binman_sym_table : { 47 __binman_sym_start = .; 48 KEEP(*(SORT(.binman_sym*))); 49 __binman_sym_end = .; 50 51 /* 52 * Force 32-byte alignment so that it lines up with the start of 53 * bss, which may have up to 32-byte alignment. This ensures 54 * that the end of the .bin file matches up with 55 * _image_binary_end or __bss_end - see board_fdt_blob_setup(). 56 * The alignment of BSS depends on what is in it, so can range 57 * from 4 to 32 bytes. 58 */ 59 . = ALIGN(32); 60 } 61 62 _image_binary_end = .; 63 64#if CONFIG_IS_ENABLED(SEPARATE_BSS) 65 . = 0x120000; 66#endif 67 .bss (OVERLAY) : { 68 __bss_start = .; 69 *(.bss*) 70 *(COM*) 71 . = ALIGN(4); 72 __bss_end = .; 73 } 74 __bss_size = __bss_end - __bss_start; 75 76 /DISCARD/ : { *(.dynstr*) } 77 /DISCARD/ : { *(.dynamic*) } 78 /DISCARD/ : { *(.plt*) } 79 /DISCARD/ : { *(.interp*) } 80 /DISCARD/ : { *(.gnu*) } 81 /DISCARD/ : { *(.note.gnu.property) } 82 83#if defined(CONFIG_SPL_X86_16BIT_INIT) || defined(CONFIG_TPL_X86_16BIT_INIT) 84 /* 85 * The following expressions place the 16-bit Real-Mode code and 86 * Reset Vector at the end of the Flash ROM 87 */ 88 . = START_16 - RESET_SEG_START; 89 .start16 : AT (START_16) { 90 KEEP(*(.start16)); 91 } 92 93 . = RESET_VEC_LOC - RESET_SEG_START; 94 .resetvec : AT (RESET_VEC_LOC) { 95 KEEP(*(.resetvec)); 96 } 97#endif 98 99} 100