Commit 39bfe90706ab0f588db7cb4d1c0e6d1181e1d2f9

Authored by Linus Torvalds

Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 vdso fix from Peter Anvin:
 "This is a single build fix for building with gold as opposed to GNU
  ld.  It got queued up separately and was expected to be pushed during
  the merge window, but it got left behind"

* 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, vdso: Make the vdso linker script compatible with Gold

Showing 1 changed file Side-by-side Diff

arch/x86/vdso/vdso-layout.lds.S
... ... @@ -9,12 +9,9 @@
9 9 #ifdef BUILD_VDSO32
10 10 #include <asm/vdso32.h>
11 11  
12   - .hpet_sect : {
13   - hpet_page = . - VDSO_OFFSET(VDSO_HPET_PAGE);
14   - } :text :hpet_sect
  12 + hpet_page = . - VDSO_OFFSET(VDSO_HPET_PAGE);
15 13  
16   - .vvar_sect : {
17   - vvar = . - VDSO_OFFSET(VDSO_VVAR_PAGE);
  14 + vvar = . - VDSO_OFFSET(VDSO_VVAR_PAGE);
18 15  
19 16 /* Place all vvars at the offsets in asm/vvar.h. */
20 17 #define EMIT_VVAR(name, offset) vvar_ ## name = vvar + offset;
... ... @@ -22,7 +19,6 @@
22 19 #include <asm/vvar.h>
23 20 #undef __VVAR_KERNEL_LDS
24 21 #undef EMIT_VVAR
25   - } :text :vvar_sect
26 22 #endif
27 23 . = SIZEOF_HEADERS;
28 24  
29 25  
... ... @@ -61,8 +57,13 @@
61 57 */
62 58 . = ALIGN(0x100);
63 59  
64   - .text : { *(.text*) } :text =0x90909090
  60 + .text : { *(.text*) } :text =0x90909090,
65 61  
  62 + /*
  63 + * The comma above works around a bug in gold:
  64 + * https://sourceware.org/bugzilla/show_bug.cgi?id=16804
  65 + */
  66 +
66 67 /DISCARD/ : {
67 68 *(.discard)
68 69 *(.discard.*)
... ... @@ -84,9 +85,5 @@
84 85 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
85 86 note PT_NOTE FLAGS(4); /* PF_R */
86 87 eh_frame_hdr PT_GNU_EH_FRAME;
87   -#ifdef BUILD_VDSO32
88   - vvar_sect PT_NULL FLAGS(4); /* PF_R */
89   - hpet_sect PT_NULL FLAGS(4); /* PF_R */
90   -#endif
91 88 }