elf-core: Strip trailing whitespace