Browse Source

powerpc: Don't use a function descriptor for system call table

There is no need to create a function descriptor for the system call
table. By using one we force the system call table into the text
section and it really belongs in the rodata section.

This also removes another use of dot symbols.

Signed-off-by: Anton Blanchard <anton@samba.org>
Anton Blanchard 11 năm trước cách đây
mục cha
commit
c857c43b34

+ 3 - 3
arch/powerpc/kernel/entry_64.S

@@ -39,8 +39,8 @@
  * System calls.
  * System calls.
  */
  */
 	.section	".toc","aw"
 	.section	".toc","aw"
-.SYS_CALL_TABLE:
-	.tc .sys_call_table[TC],.sys_call_table
+SYS_CALL_TABLE:
+	.tc sys_call_table[TC],sys_call_table
 
 
 /* This value is used to mark exception frames on the stack. */
 /* This value is used to mark exception frames on the stack. */
 exception_marker:
 exception_marker:
@@ -162,7 +162,7 @@ system_call:			/* label this so stack traces look sane */
  * Need to vector to 32 Bit or default sys_call_table here,
  * Need to vector to 32 Bit or default sys_call_table here,
  * based on caller's run-mode / personality.
  * based on caller's run-mode / personality.
  */
  */
-	ld	r11,.SYS_CALL_TABLE@toc(2)
+	ld	r11,SYS_CALL_TABLE@toc(2)
 	andi.	r10,r10,_TIF_32BIT
 	andi.	r10,r10,_TIF_32BIT
 	beq	15f
 	beq	15f
 	addi	r11,r11,8	/* use 32-bit syscall entries */
 	addi	r11,r11,8	/* use 32-bit syscall entries */

+ 5 - 1
arch/powerpc/kernel/systbl.S

@@ -36,6 +36,8 @@
 #define PPC_SYS_SPU(func)	PPC_SYS(func)
 #define PPC_SYS_SPU(func)	PPC_SYS(func)
 #define SYSX_SPU(f, f3264, f32)	SYSX(f, f3264, f32)
 #define SYSX_SPU(f, f3264, f32)	SYSX(f, f3264, f32)
 
 
+.section .rodata,"a"
+
 #ifdef CONFIG_PPC64
 #ifdef CONFIG_PPC64
 #define sys_sigpending	sys_ni_syscall
 #define sys_sigpending	sys_ni_syscall
 #define sys_old_getrlimit sys_ni_syscall
 #define sys_old_getrlimit sys_ni_syscall
@@ -43,5 +45,7 @@
 	.p2align	3
 	.p2align	3
 #endif
 #endif
 
 
-_GLOBAL(sys_call_table)
+.globl sys_call_table
+sys_call_table:
+
 #include <asm/systbl.h>
 #include <asm/systbl.h>