Unstaticize parts of coredumping code
This makes it possible to call elfN(size_segments) and elfN(puthdr)
from Linux coredump code.
Reviewed By: kib
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D30455
(cherry picked from commit 905d192d6f161496c26db29d0d429525166bfff7)