Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: BSD-2-Clause */ |
Simon Glass | fc03fb9 | 2016-11-07 08:47:10 -0700 | [diff] [blame] | 2 | /* |
| 3 | * U-Boot ARM EFI linker script |
| 4 | * |
Simon Glass | fc03fb9 | 2016-11-07 08:47:10 -0700 | [diff] [blame] | 5 | * Modified from elf_arm_efi.lds in gnu-efi |
| 6 | */ |
| 7 | |
| 8 | OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") |
| 9 | OUTPUT_ARCH(arm) |
| 10 | ENTRY(_start) |
| 11 | SECTIONS |
| 12 | { |
| 13 | .text 0x0 : { |
| 14 | _text = .; |
| 15 | *(.text.head) |
| 16 | *(.text) |
| 17 | *(.text.*) |
| 18 | *(.gnu.linkonce.t.*) |
| 19 | *(.srodata) |
| 20 | *(.rodata*) |
Heinrich Schuchardt | f263479 | 2022-01-14 21:40:15 +0100 | [diff] [blame] | 21 | . = ALIGN(512); |
Simon Glass | fc03fb9 | 2016-11-07 08:47:10 -0700 | [diff] [blame] | 22 | } |
| 23 | _etext = .; |
| 24 | _text_size = . - _text; |
| 25 | .dynamic : { *(.dynamic) } |
| 26 | .data : { |
| 27 | _data = .; |
| 28 | *(.sdata) |
| 29 | *(.data) |
| 30 | *(.data1) |
| 31 | *(.data.*) |
| 32 | *(.got.plt) |
| 33 | *(.got) |
| 34 | |
| 35 | /* |
| 36 | * The EFI loader doesn't seem to like a .bss section, so we |
| 37 | * stick it all into .data: |
| 38 | */ |
| 39 | . = ALIGN(16); |
| 40 | _bss = .; |
| 41 | *(.sbss) |
| 42 | *(.scommon) |
| 43 | *(.dynbss) |
| 44 | *(.bss) |
| 45 | *(.bss.*) |
| 46 | *(COMMON) |
Heinrich Schuchardt | f263479 | 2022-01-14 21:40:15 +0100 | [diff] [blame] | 47 | . = ALIGN(512); |
Simon Glass | fc03fb9 | 2016-11-07 08:47:10 -0700 | [diff] [blame] | 48 | _bss_end = .; |
| 49 | _edata = .; |
| 50 | } |
| 51 | .rel.dyn : { *(.rel.dyn) } |
| 52 | .rel.plt : { *(.rel.plt) } |
| 53 | .rel.got : { *(.rel.got) } |
| 54 | .rel.data : { *(.rel.data) *(.rel.data*) } |
| 55 | _data_size = . - _etext; |
| 56 | |
Simon Glass | fc03fb9 | 2016-11-07 08:47:10 -0700 | [diff] [blame] | 57 | /DISCARD/ : { |
| 58 | *(.rel.reloc) |
| 59 | *(.eh_frame) |
| 60 | *(.note.GNU-stack) |
Alexander Graf | 71acd4f | 2017-12-11 09:45:30 +0100 | [diff] [blame] | 61 | *(.dynsym) |
| 62 | *(.dynstr) |
| 63 | *(.note.gnu.build-id) |
| 64 | *(.comment) |
Simon Glass | fc03fb9 | 2016-11-07 08:47:10 -0700 | [diff] [blame] | 65 | } |
Simon Glass | fc03fb9 | 2016-11-07 08:47:10 -0700 | [diff] [blame] | 66 | } |