libelf: more generic workaround for gcc/msp430 elf file loading