Skip to contentSkip to conversation

sh: include empty_zero_page in text

DISCUSSION Sam Ravnborg 2 participants 3 messages Jun 11, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 28 lines · Linux Kernel Mailing List
Gitweb:     http://git.kernel.org/linus/53c0054c3f11b49fc09f24e46f58661def952728
Commit:     53c0054c3f11b49fc09f24e46f58661def952728
Parent:     7bce6c2740fab36708233e998a9e53115649b193
Author:     Magnus Damm <[email protected]>
AuthorDate: Mon May 11 08:45:27 2009 +0000
Committer:  Paul Mundt <[email protected]>
CommitDate: Mon May 11 18:42:14 2009 +0900

sh: include empty_zero_page in text

Include empty_zero_page in _text. This fixes a problem introduced by c3e2586b794b12ffcdf69b4e547030b51e18e6d9 which results in broken boot on R2D-Plus.

---
 arch/sh/kernel/vmlinux.lds.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/sh/kernel/vmlinux.lds.S +0 -0
index d737230..f53c76a 100644
@@ -26,12 +26,13 @@ SECTIONS
 	. = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
 #endif
 

arch/sh/kernel/vmlinux.lds.S SECTIONS · line 37

Quoted 10 lines
arch/sh/kernel/vmlinux.lds.S +2 -1
+	_text = .;		/* Text and read-only data */
+
 	.empty_zero_page : AT(ADDR(.empty_zero_page) - LOAD_OFFSET) {
 		*(.empty_zero_page)
 	} = 0
 
 	.text : AT(ADDR(.text) - LOAD_OFFSET) {
-		_text = .;		/* Text and read-only data */
 		HEAD_TEXT
 		TEXT_TEXT

This change turned _text to be an absolute symbol. Do you support rolocatable kernels then this may fail.

Sam

#2 lore raw
Quoted 35 lines · Sam Ravnborg
Quoted 34 lines · Linux Kernel Mailing List
Gitweb:     http://git.kernel.org/linus/53c0054c3f11b49fc09f24e46f58661def952728
Commit:     53c0054c3f11b49fc09f24e46f58661def952728
Parent:     7bce6c2740fab36708233e998a9e53115649b193
Author:     Magnus Damm <[email protected]>
AuthorDate: Mon May 11 08:45:27 2009 +0000
Committer:  Paul Mundt <[email protected]>
CommitDate: Mon May 11 18:42:14 2009 +0900

sh: include empty_zero_page in text

Include empty_zero_page in _text. This fixes a problem introduced by c3e2586b794b12ffcdf69b4e547030b51e18e6d9 which results in broken boot on R2D-Plus.

---
 arch/sh/kernel/vmlinux.lds.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/sh/kernel/vmlinux.lds.S +2 -0
index d737230..f53c76a 100644
@@ -26,12 +26,13 @@ SECTIONS
 	. = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
 #endif
 
+	_text = .;		/* Text and read-only data */
+
 	.empty_zero_page : AT(ADDR(.empty_zero_page) - LOAD_OFFSET) {
 		*(.empty_zero_page)
 	} = 0
 
Quoted 8 lines

arch/sh/kernel/vmlinux.lds.S SECTIONS · line 37

Quoted 4 lines
arch/sh/kernel/vmlinux.lds.S +0 -1
 	.text : AT(ADDR(.text) - LOAD_OFFSET) {
-		_text = .;		/* Text and read-only data */
 		HEAD_TEXT
 		TEXT_TEXT

This change turned _text to be an absolute symbol. Do you support rolocatable kernels then this may fail.

It actually was an absolute before, while on sh64 it was not. We will probably need to do a bit of work with the empty zero page handling on these boards with older boot loaders to permit text to be positioned later down. The relocatable kernel support we have only started experimenting with, so yes, this is something that will have to be sorted out there as well.

#3 lore raw
Quoted 10 lines
Quoted 4 lines

This change turned _text to be an absolute symbol. Do you support rolocatable kernels then this may fail.

It actually was an absolute before, while on sh64 it was not. We will probably need to do a bit of work with the empty zero page handling on these boards with older boot loaders to permit text to be positioned later down. The relocatable kernel support we have only started experimenting with, so yes, this is something that will have to be sorted out there as well.

OK - I noticed this and just wanted to be sure this was not an oversight.

Sam