MIPS64 little endian target has a "special" encoding of r_info relocation record field. Instead of one 64-bit little endian number, it is a little endian 32-bit number followed by a 32-bit big endian number. For correct reading and writing such fields we must provide information about target machine into the corresponding routine. This patch does this for the llvm-objcopy tool and fix handling of MIPS64 little endian files.
The patch looks ugly but I could not figure out how to hide the nature of MIPS64 ABI better.
The bug was reported in the issue #52647.
Add a comment like ## mips64el has a special encoding of the r_info relocation field. Test that we support both endianness.