浏览代码

arm: Provide _sdata and __bss_stop in the vmlinux.lds.S file

_sdata and __bss_stop are common symbols defined by many architectures
and made available to the kernel via asm-generic/sections.h. Kmemleak
uses these symbols when scanning the data sections.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Catalin Marinas 16 年之前
父节点
当前提交
8c7e65742f
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      arch/arm/kernel/vmlinux.lds.S

+ 2 - 0
arch/arm/kernel/vmlinux.lds.S

@@ -141,6 +141,7 @@ SECTIONS
 
 
 	.data : AT(__data_loc) {
 	.data : AT(__data_loc) {
 		_data = .;		/* address in memory */
 		_data = .;		/* address in memory */
+		_sdata = .;
 
 
 		/*
 		/*
 		 * first, the init task union, aligned
 		 * first, the init task union, aligned
@@ -192,6 +193,7 @@ SECTIONS
 		__bss_start = .;	/* BSS				*/
 		__bss_start = .;	/* BSS				*/
 		*(.bss)
 		*(.bss)
 		*(COMMON)
 		*(COMMON)
+		__bss_stop = .;
 		_end = .;
 		_end = .;
 	}
 	}
 					/* Stabs debugging sections.	*/
 					/* Stabs debugging sections.	*/