1 /* $NetBSD: elf_ia32_efi.lds,v 1.1.1.2 2018/08/16 18:17:47 jmcneill Exp $ */ 2 3 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") 4 OUTPUT_ARCH(i386) 5 ENTRY(_start) 6 SECTIONS 7 { 8 . = 0; 9 ImageBase = .; 10 /* .hash and/or .gnu.hash MUST come first! */ 11 .hash : { *(.hash) } 12 .gnu.hash : { *(.gnu.hash) } 13 . = ALIGN(4096); 14 .text : 15 { 16 _text = .; 17 *(.text) 18 *(.text.*) 19 *(.gnu.linkonce.t.*) 20 . = ALIGN(16); 21 } 22 _etext = .; 23 _text_size = . - _text; 24 . = ALIGN(4096); 25 .sdata : 26 { 27 _data = .; 28 *(.got.plt) 29 *(.got) 30 *(.srodata) 31 *(.sdata) 32 *(.sbss) 33 *(.scommon) 34 } 35 . = ALIGN(4096); 36 .data : 37 { 38 *(.rodata*) 39 *(.data) 40 *(.data1) 41 *(.data.*) 42 *(.sdata) 43 *(.got.plt) 44 *(.got) 45 /* the EFI loader doesn't seem to like a .bss section, so we stick 46 it all into .data: */ 47 *(.sbss) 48 *(.scommon) 49 *(.dynbss) 50 *(.bss) 51 *(COMMON) 52 } 53 .note.gnu.build-id : { *(.note.gnu.build-id) } 54 55 . = ALIGN(4096); 56 .dynamic : { *(.dynamic) } 57 . = ALIGN(4096); 58 .rel : 59 { 60 *(.rel.data) 61 *(.rel.data.*) 62 *(.rel.got) 63 *(.rel.stab) 64 *(.data.rel.ro.local) 65 *(.data.rel.local) 66 *(.data.rel.ro) 67 *(.data.rel*) 68 } 69 _edata = .; 70 _data_size = . - _etext; 71 . = ALIGN(4096); 72 .reloc : /* This is the PECOFF .reloc section! */ 73 { 74 *(.reloc) 75 } 76 . = ALIGN(4096); 77 .dynsym : { *(.dynsym) } 78 . = ALIGN(4096); 79 .dynstr : { *(.dynstr) } 80 . = ALIGN(4096); 81 /DISCARD/ : 82 { 83 *(.rel.reloc) 84 *(.eh_frame) 85 *(.note.GNU-stack) 86 } 87 .comment 0 : { *(.comment) } 88 } 89