llvm.org GIT mirror llvm / dade1d5
ARM: support FK_SecRel_2 relocations on WoA This adds FK_SecRel_2 relocation support to ARM. This enables the building of object files for armv7-windows-msvc which enables CodeView line tables for debugging as opposed to armv7-windows-itanium which currently uses DWARF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208273 91177308-0d34-0410-b5e6-96231b3b80d8 Saleem Abdulrasool 6 years ago
3 changed file(s) with 30 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
342342 case FK_Data_1:
343343 case FK_Data_2:
344344 case FK_Data_4:
345 return Value;
346 case FK_SecRel_2:
345347 return Value;
346348 case FK_SecRel_4:
347349 return Value;
673675 case ARM::fixup_t2_movw_lo16:
674676 return 4;
675677
678 case FK_SecRel_2:
679 return 2;
676680 case FK_SecRel_4:
677681 return 4;
678682 }
4848 default:
4949 return COFF::IMAGE_REL_ARM_ADDR32;
5050 }
51 case FK_SecRel_2:
52 return COFF::IMAGE_REL_ARM_SECTION;
5153 case FK_SecRel_4:
5254 return COFF::IMAGE_REL_ARM_SECREL;
5355 case ARM::fixup_t2_condbranch:
0 ; RUN: llc -mtriple thumbv7--windows-itanium -filetype obj -o - %s \
1 ; RUN: | llvm-readobj -r - | FileCheck %s
1 ; RUN: | llvm-readobj -r - | FileCheck %s -check-prefix CHECK-ITANIUM
2
3 ; RUN: llc -mtriple thumbv7--windows-msvc -filetype obj -o - %s \
4 ; RUN: | llvm-readobj -r - | Filecheck %s -check-prefix CHECK-MSVC
25
36 ; ModuleID = '/Users/compnerd/work/llvm/test/MC/ARM/reduced.c'
47 target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-v128:64:128-a:0:32-n32-S64"
2427 !9 = metadata !{i32 2, metadata !"Dwarf Version", i32 4}
2528 !10 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
2629
27 ; CHECK: Relocations [
28 ; CHECK: Section {{.*}} .debug_info {
29 ; CHECK: 0x6 IMAGE_REL_ARM_SECREL .debug_abbrev
30 ; CHECK: 0xC IMAGE_REL_ARM_SECREL .debug_str
31 ; CHECK: 0x12 IMAGE_REL_ARM_SECREL .debug_str
32 ; CHECK: 0x16 IMAGE_REL_ARM_SECREL .debug_line
33 ; CHECK: 0x1A IMAGE_REL_ARM_SECREL .debug_str
34 ; CHECK: 0x27 IMAGE_REL_ARM_SECREL .debug_str
35 ; CHECK: }
36 ; CHECK: Section {{.*}}.debug_pubnames {
37 ; CHECK: 0x6 IMAGE_REL_ARM_SECREL .debug_info
38 ; CHECK: }
39 ; CHECK: ]
30 ; CHECK-ITANIUM: Relocations [
31 ; CHECK-ITANIUM: Section {{.*}} .debug_info {
32 ; CHECK-ITANIUM: 0x6 IMAGE_REL_ARM_SECREL .debug_abbrev
33 ; CHECK-ITANIUM: 0xC IMAGE_REL_ARM_SECREL .debug_str
34 ; CHECK-ITANIUM: 0x12 IMAGE_REL_ARM_SECREL .debug_str
35 ; CHECK-ITANIUM: 0x16 IMAGE_REL_ARM_SECREL .debug_line
36 ; CHECK-ITANIUM: 0x1A IMAGE_REL_ARM_SECREL .debug_str
37 ; CHECK-ITANIUM: 0x27 IMAGE_REL_ARM_SECREL .debug_str
38 ; CHECK-ITANIUM: }
39 ; CHECK-ITANIUM: Section {{.*}}.debug_pubnames {
40 ; CHECK-ITANIUM: 0x6 IMAGE_REL_ARM_SECREL .debug_info
41 ; CHECK-ITANIUM: }
42 ; CHECK-ITANIUM: ]
4043
44 ; CHECK-MSVC: Relocations [
45 ; CHECK-MSVC: Section {{.*}} .debug$S {
46 ; CHECK-MSVC: 0xC IMAGE_REL_ARM_SECREL function
47 ; CHECK-MSVC: 0x10 IMAGE_REL_ARM_SECTION function
48 ; CHECK-MSVC: }
49 ; CHECK-MSVC: ]
50