Skip to contentSkip to conversation

core_kernel_data(): Fix architectures that do not define _sdata

tip:perf/core tip-bot for Ingo Molnar 1 participant 1 message May 19, 2011

lore
Share & tools
lore
#0 lore raw
Commit-ID:  c5fc472171ec4f96d06d1ac039d88f9b89bb95db
Gitweb:     http://git.kernel.org/tip/c5fc472171ec4f96d06d1ac039d88f9b89bb95db
Author:     Ingo Molnar <[email protected]>
AuthorDate: Fri, 20 May 2011 01:22:14 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 20 May 2011 01:27:16 +0200

core_kernel_data(): Fix architectures that do not define _sdata

Some architectures such as Alpha do not define _sdata but _data:

kernel/built-in.o: In function `core_kernel_data':
kernel/extable.c:77: undefined reference to `_sdata'

So expand the scope of the data range to the text addresses too, this might be more correct anyway because this way we can cover readonly variables as well.

---
 kernel/extable.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/extable.c +1 -1
index c2d625f..d44aac0 100644
@@ -74,7 +74,7 @@ int core_kernel_text(unsigned long addr)
 
 int core_kernel_data(unsigned long addr)
 {
-	if (addr >= (unsigned long)_sdata &&
+	if (addr >= (unsigned long)_stext &&
 	    addr < (unsigned long)_edata)
 		return 1;
 	return 0;