I count something like five different ELF implementations in base.
sys/kern/link_elf.c and link_elf_obj.c have tons of shareable code; sys/boot has some degree of ELF parsing / interpretation; libexec/rtld-elf has yet another implementation; usr.sbin/kldxref/ef.c is another version.
Almost all of these could benefit from fixes and implementations happening in one place (e.g. GNU hash support, which is present in rtld-elf but none of the others).
At least common code could be pulled out piecemeal to a separate file.