elfcopy contained logic to filter individual relocations in STRIP_ALL mode. However, this is not valid; relocations emitted by the linker are required, unless they apply to an entire section being removed (which is handled by other logic in elfcopy).
Note that filter_reloc is also buggy: for RELA relocation sections it operated on uninitialized rel.r_info resulting in invalid operation.
The logic most likely needs to be inverted: instead of removing relocations because their associated symbols are being removed, we must keep symbols referenced by relocations. That said, in practice we do not encounter this code path today: objects being stripped are either dynamically linked binaries which retain .dynsym, or static binaries with no relocations.
Just remove filter_reloc. Stripping binaries with relocations referencing removed symbols was already broken; after this change it may still be broken (in a different way).