#include "elf/xstormy16.h"
#include "elf/xtensa.h"
#include "elf/z80.h"
+#include "elf/loongarch.h"
#include "getopt.h"
#include "libiberty.h"
case EM_Z80:
rtype = elf_z80_reloc_type (type);
break;
+
+ case EM_LOONGARCH:
+ rtype = elf_loongarch_reloc_type (type);
+ break;
+
}
if (rtype == NULL)
strcat (buf, _(", unknown")); break;
}
break;
+ case EM_LOONGARCH:
+ if (EF_LOONGARCH_IS_LP64 (e_flags))
+ strcat (buf, ", LP64");
+ else if (EF_LOONGARCH_IS_ILP32 (e_flags))
+ strcat (buf, ", ILP32");
+
+ if (EF_LOONGARCH_IS_SOFT_FLOAT (e_flags))
+ strcat (buf, ", SOFT-FLOAT");
+ else if (EF_LOONGARCH_IS_SINGLE_FLOAT (e_flags))
+ strcat (buf, ", SINGLE-FLOAT");
+ else if (EF_LOONGARCH_IS_DOUBLE_FLOAT (e_flags))
+ strcat (buf, ", DOUBLE-FLOAT");
+
+ break;
}
}
return reloc_type == 2; /* R_IQ2000_32. */
case EM_LATTICEMICO32:
return reloc_type == 3; /* R_LM32_32. */
+ case EM_LOONGARCH:
+ return reloc_type == 1; /* R_LARCH_32. */
case EM_M32C_OLD:
case EM_M32C:
return reloc_type == 3; /* R_M32C_32. */
case EM_IA_64:
return (reloc_type == 0x26 /* R_IA64_DIR64MSB. */
|| reloc_type == 0x27 /* R_IA64_DIR64LSB. */);
+ case EM_LOONGARCH:
+ return reloc_type == 2; /* R_LARCH_64 */
case EM_PARISC:
return reloc_type == 80; /* R_PARISC_DIR64. */
case EM_PPC64:
lappend cpus_expected or1k or1knd pj powerpc pyramid riscv romp rs6000 s390 sh sparc
lappend cpus_expected tic54x tilegx tms320c30 tms320c4x tms320c54x
lappend cpus_expected v850 vax x86-64 xscale xtensa z8k z8001 z8002
+lappend cpus_expected Loongarch64 Loongarch32
# Make sure the target CPU shows up in the list.
lappend cpus_expected ${target_cpu}