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) {
133
133
return IMAGE_REL_ARM64_ADDR32NB;
134
134
case IMAGE_FILE_MACHINE_I386:
135
135
return IMAGE_REL_I386_DIR32NB;
136
+ case IMAGE_FILE_MACHINE_R4000:
137
+ return IMAGE_REL_MIPS_REFWORDNB;
136
138
}
137
139
}
138
140
Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ static Expected<COFF::MachineTypes> getCOFFFileMachine(MemoryBufferRef MB) {
168
168
uint16_t Machine = (*Obj)->getMachine ();
169
169
if (Machine != COFF::IMAGE_FILE_MACHINE_I386 &&
170
170
Machine != COFF::IMAGE_FILE_MACHINE_AMD64 &&
171
+ Machine != COFF::IMAGE_FILE_MACHINE_R4000 &&
171
172
Machine != COFF::IMAGE_FILE_MACHINE_ARMNT && !COFF::isAnyArm64 (Machine)) {
172
173
return createStringError (inconvertibleErrorCode (),
173
174
" unknown machine: " + std::to_string (Machine));
@@ -192,6 +193,8 @@ static Expected<COFF::MachineTypes> getBitcodeFileMachine(MemoryBufferRef MB) {
192
193
case Triple::aarch64:
193
194
return T.isWindowsArm64EC () ? COFF::IMAGE_FILE_MACHINE_ARM64EC
194
195
: COFF::IMAGE_FILE_MACHINE_ARM64;
196
+ case Triple::mipsel:
197
+ return COFF::IMAGE_FILE_MACHINE_R4000;
195
198
default :
196
199
return createStringError (inconvertibleErrorCode (),
197
200
" 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