Bug 192252 - Various ELF parsers and support code should be unified
Summary: Various ELF parsers and support code should be unified
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Conrad Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-29 19:54 UTC by Conrad Meyer
Modified: 2018-03-08 14:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 2018-03-08 05:32:02 UTC
At least common code could be pulled out piecemeal to a separate file.