Skip to contentSkip to conversation

Revert "x86/build: Move _etext to actual end of .text"

PATCH In review Ross Zwisler 4 participants 5 messages Jul 1, 2019 – Jul 9, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "x86/build: Move _etext to actual end of .text"

This reverts commit 392bef709659abea614abfe53cf228e7a59876a4.

Per the discussion here:

https://lkml.org/lkml/2019/6/20/830

the above referenced commit breaks kernel compilation with old GCC toolchains as well as current versions of the Gold linker. Revert it so we don't regress and lose the ability to compile the kernel with these tools.

---
 arch/x86/kernel/vmlinux.lds.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/vmlinux.lds.S +3 -3
index 0850b5149345..4d1517022a14 100644
@@ -141,10 +141,10 @@ SECTIONS
 		*(.text.__x86.indirect_thunk)
 		__indirect_thunk_end = .;
 #endif
-	} :text = 0x9090
 
-	/* End of text section */
-	_etext = .;
+		/* End of text section */
+		_etext = .;
+	} :text = 0x9090
 
 	NOTES :text :note
 
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Ross Zwisler

This reverts commit 392bef709659abea614abfe53cf228e7a59876a4.

Per the discussion here:

Quoted 8 lines

https://lkml.org/lkml/2019/6/20/830

the above referenced commit breaks kernel compilation with old GCC toolchains as well as current versions of the Gold linker. Revert it so we don't regress and lose the ability to compile the kernel with these tools.

Quoted 24 lines
---
 arch/x86/kernel/vmlinux.lds.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/vmlinux.lds.S +3 -4
index 0850b5149345..4d1517022a14 100644
@@ -141,10 +141,10 @@ SECTIONS
                *(.text.__x86.indirect_thunk)
                __indirect_thunk_end = .;
 #endif
-       } :text = 0x9090
 
-       /* End of text section */
-       _etext = .;
+               /* End of text section */
+               _etext = .;
+       } :text = 0x9090
 
        NOTES :text :note
 
--

2.20.1

#2 lore raw
In reply to Ross Zwisler
Revert "x86/build: Move _etext to actual end of .text"
Commit-ID:  77a1619947ab31564aed54621d5b1e34af9b395d
Gitweb:     https://git.kernel.org/tip/77a1619947ab31564aed54621d5b1e34af9b395d
Author:     Ross Zwisler <[email protected]>
AuthorDate: Mon, 1 Jul 2019 09:52:08 -0600
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Tue, 2 Jul 2019 21:09:44 +0200

Revert "x86/build: Move _etext to actual end of .text"

This reverts commit 392bef709659abea614abfe53cf228e7a59876a4.

Per the discussion here:

https://lkml.kernel.org/r/201906201042.3BF5CD6@keescook

the above referenced commit breaks kernel compilation with old GCC toolchains as well as current versions of the Gold linker.

Revert it to fix the regression and to keep the ability to compile the kernel with these tools.

---
 arch/x86/kernel/vmlinux.lds.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/vmlinux.lds.S +3 -3
index 0850b5149345..4d1517022a14 100644
@@ -141,10 +141,10 @@ SECTIONS
 		*(.text.__x86.indirect_thunk)
 		__indirect_thunk_end = .;
 #endif
-	} :text = 0x9090
 
-	/* End of text section */
-	_etext = .;
+		/* End of text section */
+		_etext = .;
+	} :text = 0x9090
 
 	NOTES :text :note
 
Acked-by on v1 1/1
#3 lore raw
In reply to Ross Zwisler
Quoted 4 lines · Ross Zwisler

This reverts commit 392bef709659abea614abfe53cf228e7a59876a4.

Per the discussion here:

Quoted 8 lines

https://lkml.org/lkml/2019/6/20/830

the above referenced commit breaks kernel compilation with old GCC toolchains as well as current versions of the Gold linker. Revert it so we don't regress and lose the ability to compile the kernel with these tools.

-Kees

Quoted 24 lines
---
 arch/x86/kernel/vmlinux.lds.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/vmlinux.lds.S +3 -3
index 0850b5149345..4d1517022a14 100644
@@ -141,10 +141,10 @@ SECTIONS
 		*(.text.__x86.indirect_thunk)
 		__indirect_thunk_end = .;
 #endif
-	} :text = 0x9090
 
-	/* End of text section */
-	_etext = .;
+		/* End of text section */
+		_etext = .;
+	} :text = 0x9090
 
 	NOTES :text :note
 
Signature · 1 line
2.20.1
Signature · 1 line
Kees Cook
#4 lore raw
In reply to Ross Zwisler
Revert "x86/build: Move _etext to actual end of .text"
Commit-ID:  013c66edf207ddb78422b8b636f56c87939c9e34
Gitweb:     https://git.kernel.org/tip/013c66edf207ddb78422b8b636f56c87939c9e34
Author:     Ross Zwisler <[email protected]>
AuthorDate: Mon, 1 Jul 2019 09:52:08 -0600
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 9 Jul 2019 13:57:31 +0200

Revert "x86/build: Move _etext to actual end of .text"

This reverts commit 392bef709659abea614abfe53cf228e7a59876a4.

Per the discussion here:

https://lkml.kernel.org/r/201906201042.3BF5CD6@keescook

the above referenced commit breaks kernel compilation with old GCC toolchains as well as current versions of the Gold linker.

Revert it to fix the regression and to keep the ability to compile the kernel with these tools.

---
 arch/x86/kernel/vmlinux.lds.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/vmlinux.lds.S +3 -3
index 0850b5149345..4d1517022a14 100644
@@ -141,10 +141,10 @@ SECTIONS
 		*(.text.__x86.indirect_thunk)
 		__indirect_thunk_end = .;
 #endif
-	} :text = 0x9090
 
-	/* End of text section */
-	_etext = .;
+		/* End of text section */
+		_etext = .;
+	} :text = 0x9090
 
 	NOTES :text :note