Skip to contentSkip to conversation

put sys_call_table into R/O data

PATCH New David Howells 1 participant 1 message Apr 30, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 put sys_call_table into R/O data

Hi Linus,

Here's a patch that puts the system call table into the R/O data section of the i386.

David

arch/i386/kernel/entry.S +4 -4
diff -uNr -x'*.o' -x'.*' -xTAGS linux-2.5.67/arch/i386/kernel/entry.S linux-2.5.67-afs/arch/i386/kernel/entry.S
@@ -582,8 +582,8 @@
 	pushl $do_spurious_interrupt_bug
 	jmp error_code
 
-.data
-ENTRY(sys_call_table)
+.section .rodata
+sys_call_table:
 	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
 	.long sys_exit
 	.long sys_fork
@@ -852,6 +852,6 @@
  	.long sys_clock_gettime		/* 265 */
  	.long sys_clock_getres
  	.long sys_clock_nanosleep
- 
- 
+
+
 nr_syscalls=(.-sys_call_table)/4