1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * This is the infamous ld script for the 64 b 4 * library 5 */ 6 #include <asm/vdso.h> 7 #include <asm/page.h> 8 #include <asm-generic/vmlinux.lds.h> 9 10 #ifdef __LITTLE_ENDIAN__ 11 OUTPUT_FORMAT("elf64-powerpcle", "elf64-powerp 12 #else 13 OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc" 14 #endif 15 OUTPUT_ARCH(powerpc:common64) 16 17 SECTIONS 18 { 19 PROVIDE(_vdso_datapage = . - 2 * PAGE_ 20 . = SIZEOF_HEADERS; 21 22 .hash : { *(.hash) } 23 .gnu.hash : { *(.gnu.hash) } 24 .dynsym : { *(.dynsym) } 25 .dynstr : { *(.dynstr) } 26 .gnu.version : { *(.gnu.version) } 27 .gnu.version_d : { *(.gnu.version_d) 28 .gnu.version_r : { *(.gnu.version_r) 29 30 .note : { *(.note.*) } 31 32 . = ALIGN(16); 33 .text : { 34 *(.text .stub .text.* .gnu.lin 35 *(.sfpr) 36 } 37 PROVIDE(__etext = .); 38 PROVIDE(_etext = .); 39 PROVIDE(etext = .); 40 41 . = ALIGN(8); 42 VDSO_ftr_fixup_start = .; 43 __ftr_fixup : { *(__ftr_fixup) } 44 VDSO_ftr_fixup_end = .; 45 46 . = ALIGN(8); 47 VDSO_mmu_ftr_fixup_start = .; 48 __mmu_ftr_fixup : { *(__mmu_ftr_fixup) 49 VDSO_mmu_ftr_fixup_end = .; 50 51 . = ALIGN(8); 52 VDSO_lwsync_fixup_start = .; 53 __lwsync_fixup : { *(__lwsync_fixup) 54 VDSO_lwsync_fixup_end = .; 55 56 . = ALIGN(8); 57 VDSO_fw_ftr_fixup_start = .; 58 __fw_ftr_fixup : { *(__fw_ftr_fixup) 59 VDSO_fw_ftr_fixup_end = .; 60 61 /* 62 * Other stuff is appended to the text 63 */ 64 .rodata : { *(.rodata .rodata. 65 .rodata1 : { *(.rodata1) } 66 67 .dynamic : { *(.dynamic) } 68 69 .eh_frame_hdr : { *(.eh_frame_hdr) } 70 .eh_frame : { KEEP (*(.eh_frame) 71 .gcc_except_table : { *(.gcc_except_ta 72 .rela.dyn ALIGN(8) : { *(.rela .rela*) 73 74 .got ALIGN(8) : { *(.got .toc) } 75 76 _end = .; 77 PROVIDE(end = .); 78 79 DWARF_DEBUG 80 ELF_DETAILS 81 82 /DISCARD/ : { 83 *(.note.GNU-stack) 84 *(*.EMB.apuinfo) 85 *(.branch_lt) 86 *(.data .data.* .gnu.linkonce. 87 *(.bss .sbss .dynbss .dynsbss) 88 *(.opd) 89 *(.glink .iplt .plt) 90 } 91 } 92 93 /* 94 * Very old versions of ld do not recognize th 95 */ 96 #define PT_GNU_EH_FRAME 0x6474e550 97 98 /* 99 * We must supply the ELF program headers expl 100 * PT_LOAD segment, and set the flags explicit 101 */ 102 PHDRS 103 { 104 text PT_LOAD FILEHDR PHDRS 105 dynamic PT_DYNAMIC FLAGS(4); 106 note PT_NOTE FLAGS(4); 107 eh_frame_hdr PT_GNU_EH_FRAME; 108 } 109 110 /* 111 * This controls what symbols we export from t 112 */ 113 VERSION 114 { 115 VDSO_VERSION_STRING { 116 global: 117 __kernel_get_syscall_map; 118 __kernel_gettimeofday; 119 __kernel_clock_gettime; 120 __kernel_clock_getres; 121 __kernel_get_tbfreq; 122 __kernel_sync_dicache; 123 __kernel_sigtramp_rt64; 124 __kernel_getcpu; 125 __kernel_time; 126 __kernel_getrandom; 127 128 local: *; 129 }; 130 } 131 132 /* 133 * Make the sigreturn code visible to the kern 134 */ 135 VDSO_sigtramp_rt64 = __kernel_start_sigtr
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.