__pragma bss_seg fixes, add __pragma check_stack