elf: add switch

Closes #16560