Skip to content

Commit 6b35eb9

Browse files
author
Ingo Molnar
committed
Revert "x86: Make relocatable kernel work with new binutils"
This reverts commit 86b1e8d ("x86: Make relocatable kernel work with new binutils"). Markus Trippelsdorf reported a boot failure caused by this patch. The real solution to the original patch will likely involve an arch-generic solution to define an overlaid jiffies_64 and jiffies variables. Until that's done and tested on all architectures revert this commit to solve the regression. Reported-and-bisected-by: Markus Trippelsdorf <[email protected]> Acked-by: "H. Peter Anvin" <[email protected]> Cc: Shaohua Li <[email protected]> Cc: "Lu, Hongjiu" <[email protected]> Cc: Linus Torvalds <[email protected]>, Cc: Sam Ravnborg <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent c56eb8f commit 6b35eb9

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

arch/x86/kernel/vmlinux.lds.S

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
3434
#ifdef CONFIG_X86_32
3535
OUTPUT_ARCH(i386)
3636
ENTRY(phys_startup_32)
37+
jiffies = jiffies_64;
3738
#else
3839
OUTPUT_ARCH(i386:x86-64)
3940
ENTRY(phys_startup_64)
41+
jiffies_64 = jiffies;
4042
#endif
4143

4244
#if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)
@@ -140,15 +142,6 @@ SECTIONS
140142
CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
141143

142144
DATA_DATA
143-
/*
144-
* Workaround a binutils (2.20.51.0.12 to 2.21.51.0.3) bug.
145-
* This makes jiffies relocatable in such binutils
146-
*/
147-
#ifdef CONFIG_X86_32
148-
jiffies = jiffies_64;
149-
#else
150-
jiffies_64 = jiffies;
151-
#endif
152145
CONSTRUCTORS
153146

154147
/* rarely changed data like cpu maps */

0 commit comments

Comments
 (0)