.. | .. |
---|
1 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
---|
2 | 2 | #include <asm-generic/vmlinux.lds.h> |
---|
3 | 3 | |
---|
4 | | -OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) |
---|
| 4 | +OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT) |
---|
5 | 5 | |
---|
6 | 6 | #undef i386 |
---|
7 | 7 | |
---|
.. | .. |
---|
42 | 42 | *(.rodata.*) |
---|
43 | 43 | _erodata = . ; |
---|
44 | 44 | } |
---|
45 | | - .got : { |
---|
46 | | - _got = .; |
---|
47 | | - KEEP(*(.got.plt)) |
---|
48 | | - KEEP(*(.got)) |
---|
49 | | - _egot = .; |
---|
50 | | - } |
---|
51 | 45 | .data : { |
---|
52 | 46 | _data = . ; |
---|
53 | 47 | *(.data) |
---|
54 | 48 | *(.data.*) |
---|
| 49 | + *(.bss.efistub) |
---|
55 | 50 | _edata = . ; |
---|
56 | 51 | } |
---|
57 | 52 | . = ALIGN(L1_CACHE_BYTES); |
---|
.. | .. |
---|
73 | 68 | #endif |
---|
74 | 69 | . = ALIGN(PAGE_SIZE); /* keep ZO size page aligned */ |
---|
75 | 70 | _end = .; |
---|
| 71 | + |
---|
| 72 | + STABS_DEBUG |
---|
| 73 | + DWARF_DEBUG |
---|
| 74 | + ELF_DETAILS |
---|
| 75 | + |
---|
| 76 | + DISCARDS |
---|
| 77 | + /DISCARD/ : { |
---|
| 78 | + *(.dynamic) *(.dynsym) *(.dynstr) *(.dynbss) |
---|
| 79 | + *(.hash) *(.gnu.hash) |
---|
| 80 | + *(.note.*) |
---|
| 81 | + } |
---|
| 82 | + |
---|
| 83 | + .got.plt (INFO) : { |
---|
| 84 | + *(.got.plt) |
---|
| 85 | + } |
---|
| 86 | + ASSERT(SIZEOF(.got.plt) == 0 || |
---|
| 87 | +#ifdef CONFIG_X86_64 |
---|
| 88 | + SIZEOF(.got.plt) == 0x18, |
---|
| 89 | +#else |
---|
| 90 | + SIZEOF(.got.plt) == 0xc, |
---|
| 91 | +#endif |
---|
| 92 | + "Unexpected GOT/PLT entries detected!") |
---|
| 93 | + |
---|
| 94 | + /* |
---|
| 95 | + * Sections that should stay zero sized, which is safer to |
---|
| 96 | + * explicitly check instead of blindly discarding. |
---|
| 97 | + */ |
---|
| 98 | + .got : { |
---|
| 99 | + *(.got) |
---|
| 100 | + } |
---|
| 101 | + ASSERT(SIZEOF(.got) == 0, "Unexpected GOT entries detected!") |
---|
| 102 | + |
---|
| 103 | + .plt : { |
---|
| 104 | + *(.plt) *(.plt.*) |
---|
| 105 | + } |
---|
| 106 | + ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!") |
---|
| 107 | + |
---|
| 108 | + .rel.dyn : { |
---|
| 109 | + *(.rel.*) *(.rel_*) |
---|
| 110 | + } |
---|
| 111 | + ASSERT(SIZEOF(.rel.dyn) == 0, "Unexpected run-time relocations (.rel) detected!") |
---|
| 112 | + |
---|
| 113 | + .rela.dyn : { |
---|
| 114 | + *(.rela.*) *(.rela_*) |
---|
| 115 | + } |
---|
| 116 | + ASSERT(SIZEOF(.rela.dyn) == 0, "Unexpected run-time relocations (.rela) detected!") |
---|
76 | 117 | } |
---|