added G,NX flags to build_section()