move chrpath into function in elf module