Skip to content

Commit

Permalink
core_kernel_data(): Fix architectures that do not define _sdata
Browse files Browse the repository at this point in the history
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.

Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-i878c8a0e0g0ep4v7i6vxnhz@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed May 19, 2011
1 parent 29510ec commit c5fc472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c5fc472

Please sign in to comment.