浏览代码

[SPARC64]: Mark __ex_table section correctly.

We must use the "a" (allocate) attribute every time we
emit an entry into the __ex_table section.

For consistency, use "a" instead of #alloc which is some
Solaris compat cruft GNU as provides on Sparc.

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 19 年之前
父节点
当前提交
4d000d5b96

+ 1 - 1
arch/sparc64/kernel/sys32.S

@@ -318,7 +318,7 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int)
 	nop
 	nop
 	nop
 	nop
 
 
-	.section	__ex_table
+	.section	__ex_table,"a"
 	.align		4
 	.align		4
 	.word		1b, __retl_efault, 2b, __retl_efault
 	.word		1b, __retl_efault, 2b, __retl_efault
 	.word		3b, __retl_efault, 4b, __retl_efault
 	.word		3b, __retl_efault, 4b, __retl_efault

+ 2 - 2
arch/sparc64/kernel/una_asm.S

@@ -47,7 +47,7 @@ __do_int_store:
 	 mov	0, %o0
 	 mov	0, %o0
 	.size	__do_int_store, .-__do_int_store
 	.size	__do_int_store, .-__do_int_store
 
 
-	.section	__ex_table
+	.section	__ex_table,"a"
 	.word		4b, __retl_efault
 	.word		4b, __retl_efault
 	.word		5b, __retl_efault
 	.word		5b, __retl_efault
 	.word		6b, __retl_efault
 	.word		6b, __retl_efault
@@ -129,7 +129,7 @@ do_int_load:
 	 mov	0, %o0
 	 mov	0, %o0
 	.size	__do_int_load, .-__do_int_load
 	.size	__do_int_load, .-__do_int_load
 
 
-	.section	__ex_table
+	.section	__ex_table,"a"
 	.word		4b, __retl_efault
 	.word		4b, __retl_efault
 	.word		5b, __retl_efault
 	.word		5b, __retl_efault
 	.word		6b, __retl_efault
 	.word		6b, __retl_efault

+ 1 - 1
arch/sparc64/lib/U1copy_from_user.S

@@ -9,7 +9,7 @@
 	.align 4;		\
 	.align 4;		\
 99:	retl;			\
 99:	retl;			\
 	 mov	1, %o0;		\
 	 mov	1, %o0;		\
-	.section __ex_table;	\
+	.section __ex_table,"a";\
 	.align 4;		\
 	.align 4;		\
 	.word 98b, 99b;		\
 	.word 98b, 99b;		\
 	.text;			\
 	.text;			\

+ 1 - 1
arch/sparc64/lib/U1copy_to_user.S

@@ -9,7 +9,7 @@
 	.align 4;		\
 	.align 4;		\
 99:	retl;			\
 99:	retl;			\
 	 mov	1, %o0;		\
 	 mov	1, %o0;		\
-	.section __ex_table;	\
+	.section __ex_table,"a";\
 	.align 4;		\
 	.align 4;		\
 	.word 98b, 99b;		\
 	.word 98b, 99b;		\
 	.text;			\
 	.text;			\

+ 1 - 1
arch/sparc64/lib/U3copy_from_user.S

@@ -9,7 +9,7 @@
 	.align 4;		\
 	.align 4;		\
 99:	retl;			\
 99:	retl;			\
 	 mov	1, %o0;		\
 	 mov	1, %o0;		\
-	.section __ex_table;	\
+	.section __ex_table,"a";\
 	.align 4;		\
 	.align 4;		\
 	.word 98b, 99b;		\
 	.word 98b, 99b;		\
 	.text;			\
 	.text;			\

+ 1 - 1
arch/sparc64/lib/U3copy_to_user.S

@@ -9,7 +9,7 @@
 	.align 4;		\
 	.align 4;		\
 99:	retl;			\
 99:	retl;			\
 	 mov	1, %o0;		\
 	 mov	1, %o0;		\
-	.section __ex_table;	\
+	.section __ex_table,"a";\
 	.align 4;		\
 	.align 4;		\
 	.word 98b, 99b;		\
 	.word 98b, 99b;		\
 	.text;			\
 	.text;			\

+ 1 - 1
arch/sparc64/lib/bzero.S

@@ -92,7 +92,7 @@ __bzero_done:
 	.align 4;		\
 	.align 4;		\
 99:	retl;			\
 99:	retl;			\
 	 mov	%o1, %o0;	\
 	 mov	%o1, %o0;	\
-	.section __ex_table;	\
+	.section __ex_table,"a";\
 	.align 4;		\
 	.align 4;		\
 	.word 98b, 99b;		\
 	.word 98b, 99b;		\
 	.text;			\
 	.text;			\

+ 1 - 1
arch/sparc64/lib/copy_in_user.S

@@ -13,7 +13,7 @@
 	.align 4;		\
 	.align 4;		\
 99:	retl;			\
 99:	retl;			\
 	 mov 1, %o0;		\
 	 mov 1, %o0;		\
-	.section __ex_table;	\
+	.section __ex_table,"a";\
 	.align 4;		\
 	.align 4;		\
 	.word 98b, 99b;		\
 	.word 98b, 99b;		\
 	.text;			\
 	.text;			\

+ 1 - 1
arch/sparc64/lib/csum_copy_from_user.S

@@ -9,7 +9,7 @@
 	.align 4;		\
 	.align 4;		\
 99:	retl;			\
 99:	retl;			\
 	 mov	-1, %o0;	\
 	 mov	-1, %o0;	\
-	.section __ex_table;	\
+	.section __ex_table,"a";\
 	.align 4;		\
 	.align 4;		\
 	.word 98b, 99b;		\
 	.word 98b, 99b;		\
 	.text;			\
 	.text;			\

+ 1 - 1
arch/sparc64/lib/csum_copy_to_user.S

@@ -9,7 +9,7 @@
 	.align 4;		\
 	.align 4;		\
 99:	retl;			\
 99:	retl;			\
 	 mov	-1, %o0;	\
 	 mov	-1, %o0;	\
-	.section __ex_table;	\
+	.section __ex_table,"a";\
 	.align 4;		\
 	.align 4;		\
 	.word 98b, 99b;		\
 	.word 98b, 99b;		\
 	.text;			\
 	.text;			\

+ 1 - 1
arch/sparc64/lib/strlen_user.S

@@ -85,7 +85,7 @@ __strnlen_user:
         retl
         retl
          clr    %o0
          clr    %o0
 
 
-	.section __ex_table,#alloc
+	.section __ex_table,"a"
 	.align	4
 	.align	4
 
 
 	.word	10b, 30b
 	.word	10b, 30b

+ 1 - 1
arch/sparc64/lib/strncpy_from_user.S

@@ -125,7 +125,7 @@ __strncpy_from_user:
 	 add	%o2, %o3, %o0
 	 add	%o2, %o3, %o0
 	.size	__strncpy_from_user, .-__strncpy_from_user
 	.size	__strncpy_from_user, .-__strncpy_from_user
 
 
-	.section __ex_table,#alloc
+	.section __ex_table,"a"
 	.align	4
 	.align	4
 	.word	60b, __retl_efault
 	.word	60b, __retl_efault
 	.word	61b, __retl_efault
 	.word	61b, __retl_efault

+ 1 - 1
arch/sparc64/solaris/entry64.S

@@ -217,7 +217,7 @@ solaris_unimplemented:
 	ba,pt		%xcc, ret_from_solaris
 	ba,pt		%xcc, ret_from_solaris
 	 nop
 	 nop
 
 
-	.section	__ex_table,#alloc
+	.section	__ex_table,"a"
 	.align		4
 	.align		4
 	.word		exen, exenf
 	.word		exen, exenf
 
 

+ 1 - 1
include/asm-sparc64/futex.h

@@ -20,7 +20,7 @@
 	"4:	ba	3b\n"				\
 	"4:	ba	3b\n"				\
 	"	 mov	%5, %0\n"			\
 	"	 mov	%5, %0\n"			\
 	"	.previous\n"				\
 	"	.previous\n"				\
-	"	.section __ex_table,#alloc\n"		\
+	"	.section __ex_table,\"a\"\n"		\
 	"	.align	4\n"				\
 	"	.align	4\n"				\
 	"	.word	1b, 4b\n"			\
 	"	.word	1b, 4b\n"			\
 	"	.word	2b, 4b\n"			\
 	"	.word	2b, 4b\n"			\

+ 6 - 6
include/asm-sparc64/uaccess.h

@@ -136,7 +136,7 @@ __asm__ __volatile__(							\
 	"b	2b\n\t"							\
 	"b	2b\n\t"							\
 	" mov	%3, %0\n\n\t"						\
 	" mov	%3, %0\n\n\t"						\
 	".previous\n\t"							\
 	".previous\n\t"							\
-	".section __ex_table,#alloc\n\t"				\
+	".section __ex_table,\"a\"\n\t"					\
 	".align	4\n\t"							\
 	".align	4\n\t"							\
 	".word	1b, 3b\n\t"						\
 	".word	1b, 3b\n\t"						\
 	".previous\n\n\t"						\
 	".previous\n\n\t"						\
@@ -148,7 +148,7 @@ if (__builtin_constant_p(ret) && ret == -EFAULT)			\
 __asm__ __volatile__(							\
 __asm__ __volatile__(							\
 	"/* Put user asm ret, inline. */\n"				\
 	"/* Put user asm ret, inline. */\n"				\
 "1:\t"	"st"#size "a %1, [%2] %%asi\n\n\t"				\
 "1:\t"	"st"#size "a %1, [%2] %%asi\n\n\t"				\
-	".section __ex_table,#alloc\n\t"				\
+	".section __ex_table,\"a\"\n\t"					\
 	".align	4\n\t"							\
 	".align	4\n\t"							\
 	".word	1b, __ret_efault\n\n\t"					\
 	".word	1b, __ret_efault\n\n\t"					\
 	".previous\n\n\t"						\
 	".previous\n\n\t"						\
@@ -163,7 +163,7 @@ __asm__ __volatile__(							\
 	"ret\n\t"							\
 	"ret\n\t"							\
 	" restore %%g0, %3, %%o0\n\n\t"					\
 	" restore %%g0, %3, %%o0\n\n\t"					\
 	".previous\n\t"							\
 	".previous\n\t"							\
-	".section __ex_table,#alloc\n\t"				\
+	".section __ex_table,\"a\"\n\t"					\
 	".align	4\n\t"							\
 	".align	4\n\t"							\
 	".word	1b, 3b\n\n\t"						\
 	".word	1b, 3b\n\n\t"						\
 	".previous\n\n\t"						\
 	".previous\n\n\t"						\
@@ -206,7 +206,7 @@ __asm__ __volatile__(							\
 	"b	2b\n\t"							\
 	"b	2b\n\t"							\
 	" mov	%3, %0\n\n\t"						\
 	" mov	%3, %0\n\n\t"						\
 	".previous\n\t"							\
 	".previous\n\t"							\
-	".section __ex_table,#alloc\n\t"				\
+	".section __ex_table,\"a\"\n\t"					\
 	".align	4\n\t"							\
 	".align	4\n\t"							\
 	".word	1b, 3b\n\n\t"						\
 	".word	1b, 3b\n\n\t"						\
 	".previous\n\t"							\
 	".previous\n\t"							\
@@ -218,7 +218,7 @@ if (__builtin_constant_p(retval) && retval == -EFAULT)			\
 __asm__ __volatile__(							\
 __asm__ __volatile__(							\
 	"/* Get user asm ret, inline. */\n"				\
 	"/* Get user asm ret, inline. */\n"				\
 "1:\t"	"ld"#size "a [%1] %%asi, %0\n\n\t"				\
 "1:\t"	"ld"#size "a [%1] %%asi, %0\n\n\t"				\
-	".section __ex_table,#alloc\n\t"				\
+	".section __ex_table,\"a\"\n\t"					\
 	".align	4\n\t"							\
 	".align	4\n\t"							\
 	".word	1b,__ret_efault\n\n\t"					\
 	".word	1b,__ret_efault\n\n\t"					\
 	".previous\n\t"							\
 	".previous\n\t"							\
@@ -233,7 +233,7 @@ __asm__ __volatile__(							\
 	"ret\n\t"							\
 	"ret\n\t"							\
 	" restore %%g0, %2, %%o0\n\n\t"					\
 	" restore %%g0, %2, %%o0\n\n\t"					\
 	".previous\n\t"							\
 	".previous\n\t"							\
-	".section __ex_table,#alloc\n\t"				\
+	".section __ex_table,\"a\"\n\t"					\
 	".align	4\n\t"							\
 	".align	4\n\t"							\
 	".word	1b, 3b\n\n\t"						\
 	".word	1b, 3b\n\n\t"						\
 	".previous\n\t"							\
 	".previous\n\t"							\