mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-23 18:04:18 +08:00
crt: Fix .seh_handler directives for ARM
The latest LLVM from git supports generating SEH unwind info on ARM.
In ARM assembly, '@' is a comment character. Therefore, the use
of that character in .seh_handler directives doesn't work on ARM.
LLVM now accepts '%' as an alternative for '@' in .seh_handler
directives [1], consistent with how GAS explains using '%' as an
alternative for '@' in such cases [2]. (However, GAS doesn't
support '%' as alternative char in .seh_handler on x86_64, not
yet at least.)
[1] 6b75a3523f
[2] https://sourceware.org/binutils/docs/as/Section.html#Section
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
c90a062674
commit
08fd589f44
@ -177,7 +177,11 @@ int WinMainCRTStartup (void)
|
||||
#ifdef SEH_INLINE_ASM
|
||||
asm ("\tnop\n"
|
||||
"\t.l_endw: nop\n"
|
||||
#ifdef __arm__
|
||||
"\t.seh_handler __C_specific_handler, %except\n"
|
||||
#else
|
||||
"\t.seh_handler __C_specific_handler, @except\n"
|
||||
#endif
|
||||
"\t.seh_handlerdata\n"
|
||||
"\t.long 1\n"
|
||||
"\t.rva .l_startw, .l_endw, _gnu_exception_handler ,.l_endw\n"
|
||||
@ -203,7 +207,11 @@ int mainCRTStartup (void)
|
||||
#ifdef SEH_INLINE_ASM
|
||||
asm ("\tnop\n"
|
||||
"\t.l_end: nop\n"
|
||||
#ifdef __arm__
|
||||
"\t.seh_handler __C_specific_handler, %except\n"
|
||||
#else
|
||||
"\t.seh_handler __C_specific_handler, @except\n"
|
||||
#endif
|
||||
"\t.seh_handlerdata\n"
|
||||
"\t.long 1\n"
|
||||
"\t.rva .l_start, .l_end, _gnu_exception_handler ,.l_end\n"
|
||||
|
@ -1527,7 +1527,11 @@ pthread_create_wrapper (void *args)
|
||||
trslt = (intptr_t) tv->func(tv->ret_arg);
|
||||
#ifdef __SEH__
|
||||
asm ("\tnop\n\t.tl_end: nop\n"
|
||||
#ifdef __arm__
|
||||
"\t.seh_handler __C_specific_handler, %except\n"
|
||||
#else
|
||||
"\t.seh_handler __C_specific_handler, @except\n"
|
||||
#endif
|
||||
"\t.seh_handlerdata\n"
|
||||
"\t.long 1\n"
|
||||
"\t.rva .tl_start, .tl_end, _gnu_exception_handler ,.tl_end\n"
|
||||
|
Loading…
Reference in New Issue
Block a user