* include/grub/types.h (__unused): Rename to UNUSED. * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused. (grub_elf64_size): Likewise.
* kern/elf.c (grub_elf_file): Call grub_file_seek. Call grub_error_push and grub_error_pop in the error-handling path. (grub_elf32_load_segment): Only call grub_file_read with non-zero length.
* include/grub/elfload.h: New file. * kern/elf.c: Likewise.