Skip to content

Commit

Permalink
x86, extable: Use .pushsection ... .popsection for _ASM_EXTABLE()
Browse files Browse the repository at this point in the history
Instead of using .section ... .previous, use .pushsection
... .popsection; this is (hopefully) a bit more robust, especially in
complex assembly code.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: David Daney <david.daney@cavium.com>
Link: http://lkml.kernel.org/r/CA%2B55aFyijf43qSu3N9nWHEBwaGbb7T2Oq9A=9EyR=Jtyqfq_cQ@mail.gmail.com
  • Loading branch information
H. Peter Anvin committed Apr 20, 2012
1 parent 060feb6 commit d454180
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions arch/x86/include/asm/asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@

/* Exception table entry */
#ifdef __ASSEMBLY__
# define _ASM_EXTABLE(from,to) \
__ASM_EX_SEC ; \
_ASM_ALIGN ; \
_ASM_PTR from , to ; \
.previous
# define _ASM_EXTABLE(from,to) \
.pushsection "__ex_table","a" ; \
_ASM_ALIGN ; \
_ASM_PTR from , to ; \
.popsection
#else
# define _ASM_EXTABLE(from,to) \
__ASM_EX_SEC \
_ASM_ALIGN "\n" \
_ASM_PTR #from "," #to "\n" \
" .previous\n"
# define _ASM_EXTABLE(from,to) \
" .pushsection \"__ex_table\",\"a\"\n" \
_ASM_ALIGN "\n" \
_ASM_PTR #from "," #to "\n" \
" .popsection\n"
#endif

#endif /* _ASM_X86_ASM_H */

0 comments on commit d454180

Please sign in to comment.