Per https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234949 the performance of elf_getscn(3) significantly influences the performance of elfcopy/strip on objects containing a large number of sections.
The use of <sys/tree.h>
(e.g., https://reviews.freebsd.org/D20443) speeds up elfcopy/strip significantly for such workloads.
We're also using sys/tree.h for addr2line, thread at https://sourceforge.net/p/elftoolchain/mailman/message/36923333/