-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed linker script; .edata *and* .pdata required by MingW for SEH. * Removed buggy `-fdata-sections` and `-ffunction-sections`. Signed-off-by: Toni Uhlig <[email protected]>
- Loading branch information
Showing
8 changed files
with
116 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef EXCEPT_H | ||
#define EXCEPT_H 1 | ||
|
||
#ifndef __SEH__ | ||
#error "SEH not supported by your toolchain!" | ||
#endif | ||
|
||
#ifdef __try1 | ||
#undef __try1 | ||
#endif | ||
|
||
#ifdef __except1 | ||
#undef __except1 | ||
#endif | ||
|
||
#define __dpptry(handler, counter) \ | ||
__asm__ goto( \ | ||
".seh_handler __C_specific_handler, @except\n\t" \ | ||
".seh_handlerdata\n\t" \ | ||
".long 1\n\t" \ | ||
".rva .l_startw" #counter ", .l_endw" #counter ", " #handler ", .l_exceptw" #counter \ | ||
"\n\t" \ | ||
".section .text\n" \ | ||
".l_startw" #counter ":" :: ::except); | ||
|
||
#define __dppexcept(counter) \ | ||
goto end; \ | ||
except: \ | ||
__asm__(".l_exceptw" #counter ":"); | ||
|
||
#define __dpptryend(counter) \ | ||
end: \ | ||
__asm__(".l_endw" #counter ":"); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.