The MIPS64 ABI has various quirks that we need to support.
The format of 'Rel' and 'Rela' records is slightly different in this ABI. Instead of a 64 bit r_info field, this ABI uses an Elf64_Word r_sym followed by 4 byte values r_ssym, r_type3, r_type2, and r_type.
We need to adjust the way libelf translates these structures between their memory and file representation.
For users, we may want to consider offering a struct Elf64_Rel_mips and/or accessor macros for the r_info field, that makes programming more convenient.
We also need to add the symbols mentioned in the MIPS Elf64 ABI documentation, e.g. the definition at ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/elf64-2.1.ps.
Related ticket: #532.
See FreeBSD commit:
elfcopy: fix little-endian MIPS64 objects
https://reviews.freebsd.org/D15734
https://reviews.freebsd.org/rS344855
https://reviews.freebsd.org/rS339083
https://reviews.freebsd.org/rS339473