Skip to contentSkip to conversation

x86: Provide _sdata in the vmlinux.lds.S file

PATCH In review Catalin Marinas 1 participant 3 messages May 11, 2009 – Jun 12, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Provide _sdata in the vmlinux.lds.S file

_sdata is a common symbol defined by many architectures and made available to the kernel via asm-generic/sections.h. Kmemleak uses this symbol when scanning the data sections.

---

(This patch is against the tip/master branch)

 arch/x86/kernel/vmlinux.lds.S |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/vmlinux.lds.S +2 -0
index 4c85b2e..367e878 100644
@@ -108,6 +108,8 @@ SECTIONS
 	/* Data */
 	. = ALIGN(PAGE_SIZE);
 	.data : AT(ADDR(.data) - LOAD_OFFSET) {
+		/* Start of data section */
+		_sdata = .;
 		DATA_DATA
 		CONSTRUCTORS
 
#1 lore raw
Commit-ID:  4504c6d020fc5aec7659bf7746e71b1b904571f8
Gitweb:     http://git.kernel.org/tip/4504c6d020fc5aec7659bf7746e71b1b904571f8
Author:     Catalin Marinas <[email protected]>
AuthorDate: Mon, 11 May 2009 13:22:00 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 11 May 2009 14:28:55 +0200

x86: Provide _sdata in the vmlinux.lds.S file

_sdata is a common symbol defined by many architectures and made available to the kernel via asm-generic/sections.h. Kmemleak uses this symbol when scanning the data sections.

[ Impact: add new global symbol ]

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/vmlinux.lds.S |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/vmlinux.lds.S +2 -0
index 4c85b2e..367e878 100644
@@ -108,6 +108,8 @@ SECTIONS
 	/* Data */
 	. = ALIGN(PAGE_SIZE);
 	.data : AT(ADDR(.data) - LOAD_OFFSET) {
+		/* Start of data section */
+		_sdata = .;
 		DATA_DATA
 		CONSTRUCTORS
 
#2 lore raw
In reply to Catalin Marinas
Commit-ID:  1260866a271abc84274345580f3d613d3bceff87
Gitweb:     http://git.kernel.org/tip/1260866a271abc84274345580f3d613d3bceff87
Author:     Catalin Marinas <[email protected]>
AuthorDate: Mon, 11 May 2009 13:22:00 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 12 Jun 2009 09:21:33 +0200

x86: Provide _sdata in the vmlinux.lds.S file

_sdata is a common symbol defined by many architectures and made available to the kernel via asm-generic/sections.h. Kmemleak uses this symbol when scanning the data sections.

[ Impact: add new global symbol ]

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/vmlinux.lds.S |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/vmlinux.lds.S +2 -0
index 4c85b2e..367e878 100644
@@ -108,6 +108,8 @@ SECTIONS
 	/* Data */
 	. = ALIGN(PAGE_SIZE);
 	.data : AT(ADDR(.data) - LOAD_OFFSET) {
+		/* Start of data section */
+		_sdata = .;
 		DATA_DATA
 		CONSTRUCTORS