Attempting to make use of some WIP with statically linked binaries (i386 / amd64) has uncovered a number of tool chain issues which will be tracked in this PR.
* elfcopy/strip removes ifunc, probably other relocations
Found by kib@, with userland ifunc stripped statically linked binaries segfault. strip removed the .rela.plt section header; file content at the expected relocation site has been zeroed.
See LLVM PR 37538 for an initial part of this issue - lld is writing 0 in sh_info and sh_link on the .rela.plt section. https://bugs.llvm.org/show_bug.cgi?id=37538
This likely also affects static PIE.
Another llvm PR that may be related: https://bugs.llvm.org/show_bug.cgi?id=38074
lld issue fixed in r339304