File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ static uint16_t getImgRelRelocation(MachineTypes Machine) {
133133 return IMAGE_REL_ARM64_ADDR32NB;
134134 case IMAGE_FILE_MACHINE_I386:
135135 return IMAGE_REL_I386_DIR32NB;
136+ case IMAGE_FILE_MACHINE_R4000:
137+ return IMAGE_REL_MIPS_REFWORDNB;
136138 }
137139}
138140
Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ static Expected<COFF::MachineTypes> getCOFFFileMachine(MemoryBufferRef MB) {
168168 uint16_t Machine = (*Obj)->getMachine ();
169169 if (Machine != COFF::IMAGE_FILE_MACHINE_I386 &&
170170 Machine != COFF::IMAGE_FILE_MACHINE_AMD64 &&
171+ Machine != COFF::IMAGE_FILE_MACHINE_R4000 &&
171172 Machine != COFF::IMAGE_FILE_MACHINE_ARMNT && !COFF::isAnyArm64 (Machine)) {
172173 return createStringError (inconvertibleErrorCode (),
173174 " unknown machine: " + std::to_string (Machine));
@@ -192,6 +193,8 @@ static Expected<COFF::MachineTypes> getBitcodeFileMachine(MemoryBufferRef MB) {
192193 case Triple::aarch64:
193194 return T.isWindowsArm64EC () ? COFF::IMAGE_FILE_MACHINE_ARM64EC
194195 : COFF::IMAGE_FILE_MACHINE_ARM64;
196+ case Triple::mipsel:
197+ return COFF::IMAGE_FILE_MACHINE_R4000;
195198 default :
196199 return createStringError (inconvertibleErrorCode (),
197200 " unknown arch in target triple: " + *TripleStr);
Original file line number Diff line number Diff line change 1+ RUN: rm -f %t.lib
2+
3+ RUN: llvm-lib /out:%t.lib /machine:i386 2>&1 | FileCheck --check-prefix=EMPTYWARN %s
4+ RUN: llvm-lib /out:%t.lib /machine:amd64 2>&1 | FileCheck --check-prefix=EMPTYWARN %s
5+
6+ RUN: llvm-lib /out:%t.lib /machine:mipsel 2>&1 | FileCheck --check-prefix=EMPTYWARN %s
7+
8+ RUN: llvm-lib /out:%t.lib /machine:arm 2>&1 | FileCheck --check-prefix=EMPTYWARN %s
9+ RUN: llvm-lib /out:%t.lib /machine:arm64 2>&1 | FileCheck --check-prefix=EMPTYWARN %s
10+ RUN: llvm-lib /out:%t.lib /machine:arm64x 2>&1 | FileCheck --check-prefix=EMPTYWARN %s
11+
12+ EMPTYWARN: warning: no input files, not writing output file
13+
You can’t perform that action at this time.
0 commit comments