[ELF][Hexagon] remove duplicated code