Stack layout is different when -g used, so need to handle the pendsv jump differently. Addresses Issue #315.