Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mips] Handle one byte unsupported relocations
Fail gracefully instead of crashing upon encountering this type of relocation. Differential revision: https://reviews.llvm.org/D41857 llvm-svn: 322266
- Loading branch information
Stefan Maksimovic
committed
Jan 11, 2018
1 parent
ba5fd77
commit 5481c21
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# RUN: not llvm-mc -triple mips-unknown-linux -filetype=obj %s 2>%t | ||
# RUN: FileCheck %s < %t | ||
|
||
# Check that we emit an error for unsupported relocations instead of crashing. | ||
|
||
.globl x | ||
|
||
.data | ||
foo: | ||
.byte x | ||
.byte x+1 | ||
|
||
# CHECK: LLVM ERROR: MIPS does not support one byte relocations |