Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | 9e8dd4f | 2017-01-16 07:04:02 -0700 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2002 |
| 4 | * Daniel Engström, Omicron Ceti AB, daniel@omicron.se. |
Simon Glass | 9e8dd4f | 2017-01-16 07:04:02 -0700 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <config.h> |
| 8 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") |
| 9 | OUTPUT_ARCH(i386) |
| 10 | ENTRY(_start) |
| 11 | |
| 12 | SECTIONS |
| 13 | { |
| 14 | #ifndef CONFIG_CMDLINE |
| 15 | /DISCARD/ : { *(.u_boot_list_2_cmd_*) } |
| 16 | #endif |
| 17 | |
Tom Rini | 2aaa27d | 2019-01-22 17:09:26 -0500 | [diff] [blame] | 18 | . = IMAGE_TEXT_BASE; /* Location of bootcode in flash */ |
Simon Glass | 9e8dd4f | 2017-01-16 07:04:02 -0700 | [diff] [blame] | 19 | __text_start = .; |
| 20 | .text : { *(.text*); } |
| 21 | |
| 22 | . = ALIGN(4); |
| 23 | |
| 24 | . = ALIGN(4); |
| 25 | .u_boot_list : { |
| 26 | KEEP(*(SORT(.u_boot_list*))); |
| 27 | } |
| 28 | |
| 29 | . = ALIGN(4); |
| 30 | .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } |
| 31 | |
| 32 | . = ALIGN(4); |
| 33 | .data : { *(.data*) } |
| 34 | |
| 35 | . = ALIGN(4); |
| 36 | __data_end = .; |
| 37 | __init_end = .; |
Simon Glass | 5a4e018 | 2019-09-25 08:11:36 -0600 | [diff] [blame] | 38 | . = ALIGN(4); |
| 39 | .binman_sym_table : { |
| 40 | __binman_sym_start = .; |
| 41 | KEEP(*(SORT(.binman_sym*))); |
| 42 | __binman_sym_end = .; |
| 43 | } |
Simon Glass | 9e8dd4f | 2017-01-16 07:04:02 -0700 | [diff] [blame] | 44 | |
| 45 | _image_binary_end = .; |
| 46 | |
| 47 | . = 0x120000; |
| 48 | .bss (OVERLAY) : { |
| 49 | __bss_start = .; |
| 50 | *(.bss*) |
| 51 | *(COM*) |
| 52 | . = ALIGN(4); |
| 53 | __bss_end = .; |
| 54 | } |
| 55 | __bss_size = __bss_end - __bss_start; |
| 56 | |
| 57 | /DISCARD/ : { *(.dynstr*) } |
| 58 | /DISCARD/ : { *(.dynamic*) } |
| 59 | /DISCARD/ : { *(.plt*) } |
| 60 | /DISCARD/ : { *(.interp*) } |
| 61 | /DISCARD/ : { *(.gnu*) } |
| 62 | |
Simon Glass | 79ef699 | 2019-04-25 21:58:53 -0600 | [diff] [blame] | 63 | #if defined(CONFIG_SPL_X86_16BIT_INIT) || defined(CONFIG_TPL_X86_16BIT_INIT) |
Simon Glass | 9e8dd4f | 2017-01-16 07:04:02 -0700 | [diff] [blame] | 64 | /* |
| 65 | * The following expressions place the 16-bit Real-Mode code and |
| 66 | * Reset Vector at the end of the Flash ROM |
| 67 | */ |
| 68 | . = START_16 - RESET_SEG_START; |
| 69 | .start16 : AT (START_16) { |
| 70 | KEEP(*(.start16)); |
| 71 | } |
| 72 | |
| 73 | . = RESET_VEC_LOC - RESET_SEG_START; |
| 74 | .resetvec : AT (RESET_VEC_LOC) { |
| 75 | KEEP(*(.resetvec)); |
| 76 | } |
| 77 | #endif |
| 78 | |
| 79 | } |