]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
kldxref: Simplify handling of ELF object files
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 22 Dec 2023 15:49:18 +0000 (07:49 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Fri, 22 Dec 2023 15:49:18 +0000 (07:49 -0800)
commit0d557cdf6f0e94e909acea065f3de2a28437ae74
treec7e263824bd40127d6b3488ead71618e94e6b2fd
parented96fd7fc652d77ae5e34727e54610e87854defc
kldxref: Simplify handling of ELF object files

Unlike the backend for ELF DSOs, the object file backend allocated an
aligned chunk of memory and read all of the in-memory sections from
the file into this memory even though most of the file contents were
never used.  Instead, just track a set of virtual addresses (based at
0) that each loaded section would be loaded at and only read the
necessary bits from the backing file when needed.

Reviewed by: imp
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D43126
usr.sbin/kldxref/ef_obj.c