hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/x86/entry/vdso/vdso-layout.lds.S
....@@ -7,16 +7,6 @@
77 * This script controls its layout.
88 */
99
10
-#if defined(BUILD_VDSO64)
11
-# define SHDR_SIZE 64
12
-#elif defined(BUILD_VDSO32) || defined(BUILD_VDSOX32)
13
-# define SHDR_SIZE 40
14
-#else
15
-# error unknown VDSO target
16
-#endif
17
-
18
-#define NUM_FAKE_SHDRS 13
19
-
2010 SECTIONS
2111 {
2212 /*
....@@ -26,18 +16,23 @@
2616 * segment.
2717 */
2818
29
- vvar_start = . - 3 * PAGE_SIZE;
30
- vvar_page = vvar_start;
19
+ vvar_start = . - 4 * PAGE_SIZE;
20
+ vvar_page = vvar_start;
3121
3222 /* Place all vvars at the offsets in asm/vvar.h. */
3323 #define EMIT_VVAR(name, offset) vvar_ ## name = vvar_page + offset;
34
-#define __VVAR_KERNEL_LDS
3524 #include <asm/vvar.h>
36
-#undef __VVAR_KERNEL_LDS
3725 #undef EMIT_VVAR
3826
3927 pvclock_page = vvar_start + PAGE_SIZE;
4028 hvclock_page = vvar_start + 2 * PAGE_SIZE;
29
+ timens_page = vvar_start + 3 * PAGE_SIZE;
30
+
31
+#undef _ASM_X86_VVAR_H
32
+ /* Place all vvars in timens too at the offsets in asm/vvar.h. */
33
+#define EMIT_VVAR(name, offset) timens_ ## name = timens_page + offset;
34
+#include <asm/vvar.h>
35
+#undef EMIT_VVAR
4136
4237 . = SIZEOF_HEADERS;
4338
....@@ -60,20 +55,15 @@
6055 *(.bss*)
6156 *(.dynbss*)
6257 *(.gnu.linkonce.b.*)
63
-
64
- /*
65
- * Ideally this would live in a C file, but that won't
66
- * work cleanly for x32 until we start building the x32
67
- * C code using an x32 toolchain.
68
- */
69
- VDSO_FAKE_SECTION_TABLE_START = .;
70
- . = . + NUM_FAKE_SHDRS * SHDR_SIZE;
71
- VDSO_FAKE_SECTION_TABLE_END = .;
7258 } :text
7359
74
- .fake_shstrtab : { *(.fake_shstrtab) } :text
75
-
76
-
60
+ /*
61
+ * Discard .note.gnu.property sections which are unused and have
62
+ * different alignment requirement from vDSO note sections.
63
+ */
64
+ /DISCARD/ : {
65
+ *(.note.gnu.property)
66
+ }
7767 .note : { *(.note.*) } :text :note
7868
7969 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
....@@ -87,11 +77,6 @@
8777
8878 .text : { *(.text*) } :text =0x90909090,
8979
90
- /*
91
- * At the end so that eu-elflint stays happy when vdso2c strips
92
- * these. A better implementation would avoid allocating space
93
- * for these.
94
- */
9580 .altinstructions : { *(.altinstructions) } :text
9681 .altinstr_replacement : { *(.altinstr_replacement) } :text
9782