core & emul_llvm: improve segmentation support