cleanup cg code
remove unused definition
add new macro for undefined segment/section