fix misplacement of comm_dup
add test for etext segment comm