]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
elfcopy: Use libelftc's string table routines to build .shstrtab.
authorMark Johnston <markj@FreeBSD.org>
Tue, 4 Jun 2019 18:34:05 +0000 (18:34 +0000)
committerMark Johnston <markj@FreeBSD.org>
Tue, 4 Jun 2019 18:34:05 +0000 (18:34 +0000)
commitbc589b723e7838634c32548cdff2150c5cf20fed
treedd76c37a48ec1285a87b08b765380037402fcf7c
parentd7bcf7363030e0bffa5b0ad7f5addcb36084e357
elfcopy: Use libelftc's string table routines to build .shstrtab.

This replaces some hand-rolled routines and is substantially faster
since libelftc uses a hash table for lookups and insertions, whereas
elfcopy would perform a linear scan of the table.

PR: 234949
Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20473
contrib/elftoolchain/elfcopy/ascii.c
contrib/elftoolchain/elfcopy/binary.c
contrib/elftoolchain/elfcopy/elfcopy.h
contrib/elftoolchain/elfcopy/main.c
contrib/elftoolchain/elfcopy/sections.c