@@ -134,6 +134,7 @@ impl<'a> Object<'a> {
134134 Architecture :: X86_64 => true ,
135135 Architecture :: X86_64_X32 => true ,
136136 Architecture :: Hexagon => true ,
137+ Architecture :: LoongArch32 => true ,
137138 Architecture :: LoongArch64 => true ,
138139 Architecture :: M68k => true ,
139140 Architecture :: Mips => false ,
@@ -252,7 +253,7 @@ impl<'a> Object<'a> {
252253 ( K :: Absolute , _, 32 ) => elf:: R_HEX_32 ,
253254 _ => return unsupported_reloc ( ) ,
254255 } ,
255- Architecture :: LoongArch64 => match ( kind, encoding, size) {
256+ Architecture :: LoongArch32 | Architecture :: LoongArch64 => match ( kind, encoding, size) {
256257 ( K :: Absolute , _, 32 ) => elf:: R_LARCH_32 ,
257258 ( K :: Absolute , _, 64 ) => elf:: R_LARCH_64 ,
258259 ( K :: Relative , _, 32 ) => elf:: R_LARCH_32_PCREL ,
@@ -572,6 +573,7 @@ impl<'a> Object<'a> {
572573 ( Architecture :: X86_64 , None ) => elf:: EM_X86_64 ,
573574 ( Architecture :: X86_64_X32 , None ) => elf:: EM_X86_64 ,
574575 ( Architecture :: Hexagon , None ) => elf:: EM_HEXAGON ,
576+ ( Architecture :: LoongArch32 , None ) => elf:: EM_LOONGARCH ,
575577 ( Architecture :: LoongArch64 , None ) => elf:: EM_LOONGARCH ,
576578 ( Architecture :: M68k , None ) => elf:: EM_68K ,
577579 ( Architecture :: Mips , None ) => elf:: EM_MIPS ,
0 commit comments