Bug 192252

Summary: Various ELF parsers and support code should be unified
Product: Base System Reporter: Conrad Meyer <cse.cem>
Component: kernAssignee: Conrad Meyer <cem>
Status: New ---    
Severity: Affects Only Me CC: emaste, shawn.webb
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Conrad Meyer 2014-07-29 19:54:24 UTC
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).
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2018-03-08 05:32:02 UTC
At least common code could be pulled out piecemeal to a separate file.