llvm.org GIT mirror llvm / 374d70e
Merging r322266: ------------------------------------------------------------------------ r322266 | smaksimovic | 2018-01-11 02:07:47 -0800 (Thu, 11 Jan 2018) | 7 lines [Mips] Handle one byte unsupported relocations Fail gracefully instead of crashing upon encountering this type of relocation. Differential revision: https://reviews.llvm.org/D41857 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332765 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 1 year, 5 months ago
2 changed file(s) with 15 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
224224 switch (Kind) {
225225 case Mips::fixup_Mips_NONE:
226226 return ELF::R_MIPS_NONE;
227 case FK_Data_1:
228 report_fatal_error("MIPS does not support one byte relocations");
227229 case Mips::fixup_Mips_16:
228230 case FK_Data_2:
229231 return IsPCRel ? ELF::R_MIPS_PC16 : ELF::R_MIPS_16;
0 # RUN: not llvm-mc -triple mips-unknown-linux -filetype=obj %s 2>%t
1 # RUN: FileCheck %s < %t
2
3 # Check that we emit an error for unsupported relocations instead of crashing.
4
5 .globl x
6
7 .data
8 foo:
9 .byte x
10 .byte x+1
11
12 # CHECK: LLVM ERROR: MIPS does not support one byte relocations