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 = .; |
Simon Glass | 7a13138 | 2019-12-06 21:42:00 -0700 | [diff] [blame] | 20 | .text : { |
| 21 | __image_copy_start = .; |
| 22 | *(.text*); |
| 23 | } |
Simon Glass | 9e8dd4f | 2017-01-16 07:04:02 -0700 | [diff] [blame] | 24 | |
| 25 | . = ALIGN(4); |
| 26 | |
| 27 | . = ALIGN(4); |
| 28 | .u_boot_list : { |
| 29 | KEEP(*(SORT(.u_boot_list*))); |
| 30 | } |
| 31 | |
| 32 | . = ALIGN(4); |
| 33 | .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } |
| 34 | |
| 35 | . = ALIGN(4); |
| 36 | .data : { *(.data*) } |
| 37 | |
| 38 | . = ALIGN(4); |
| 39 | __data_end = .; |
| 40 | __init_end = .; |
Simon Glass | 5a4e018 | 2019-09-25 08:11:36 -0600 | [diff] [blame] | 41 | . = ALIGN(4); |
| 42 | .binman_sym_table : { |
| 43 | __binman_sym_start = .; |
| 44 | KEEP(*(SORT(.binman_sym*))); |
| 45 | __binman_sym_end = .; |
| 46 | } |
Simon Glass | 9e8dd4f | 2017-01-16 07:04:02 -0700 | [diff] [blame] | 47 | |
| 48 | _image_binary_end = .; |
| 49 | |
| 50 | . = 0x120000; |
| 51 | .bss (OVERLAY) : { |
| 52 | __bss_start = .; |
| 53 | *(.bss*) |
| 54 | *(COM*) |
| 55 | . = ALIGN(4); |
| 56 | __bss_end = .; |
| 57 | } |
| 58 | __bss_size = __bss_end - __bss_start; |
| 59 | |
| 60 | /DISCARD/ : { *(.dynstr*) } |
| 61 | /DISCARD/ : { *(.dynamic*) } |
| 62 | /DISCARD/ : { *(.plt*) } |
| 63 | /DISCARD/ : { *(.interp*) } |
| 64 | /DISCARD/ : { *(.gnu*) } |
| 65 | |
Simon Glass | 79ef699 | 2019-04-25 21:58:53 -0600 | [diff] [blame] | 66 | #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] | 67 | /* |
| 68 | * The following expressions place the 16-bit Real-Mode code and |
| 69 | * Reset Vector at the end of the Flash ROM |
| 70 | */ |
| 71 | . = START_16 - RESET_SEG_START; |
| 72 | .start16 : AT (START_16) { |
| 73 | KEEP(*(.start16)); |
| 74 | } |
| 75 | |
| 76 | . = RESET_VEC_LOC - RESET_SEG_START; |
| 77 | .resetvec : AT (RESET_VEC_LOC) { |
| 78 | KEEP(*(.resetvec)); |
| 79 | } |
| 80 | #endif |
| 81 | |
| 82 | } |