forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for ARM and AArch64 BE object files
This change fixes the ARM and AArch64 relocation visitors in RelocVisitor. They were unconditionally assuming the object data are little-endian. Tests have been added to ensure that the llvm-dwarfdump utility does not crash when processing big-endian object files. Patch by Charlie Turner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218407 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
5 changed files
with
51 additions
and
4 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,16 @@ | ||
; RUN: llc -O0 -filetype=obj -o %t1 < %s | ||
; RUN: llvm-dwarfdump %t1 | ||
|
||
target datalayout = "E-m:e-i64:64-i128:128-n32:64-S128" | ||
target triple = "aarch64_be-none--eabi" | ||
|
||
!llvm.dbg.cu = !{!0} | ||
!llvm.module.flags = !{!3, !4} | ||
!llvm.ident = !{!5} | ||
|
||
!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.6.0 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99] | ||
!1 = metadata !{metadata !"empty.c", metadata !"/a"} | ||
!2 = metadata !{} | ||
!3 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} | ||
!4 = metadata !{i32 2, metadata !"Debug Info Version", i32 1} | ||
!5 = metadata !{metadata !"clang version 3.6.0 "} |
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,2 @@ | ||
if not 'AArch64' in config.root.targets: | ||
config.unsupported = True |
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,18 @@ | ||
; RUN: llc -O0 -filetype=obj -o %t1 < %s | ||
; RUN: llvm-dwarfdump %t1 | ||
|
||
target datalayout = "E-m:e-p:32:32-i64:64-v128:64:128-n32-S64" | ||
target triple = "armebv8-none--eabi" | ||
|
||
!llvm.dbg.cu = !{!0} | ||
!llvm.module.flags = !{!3, !4, !5, !6} | ||
!llvm.ident = !{!7} | ||
|
||
!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.6.0 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99] | ||
!1 = metadata !{metadata !"empty.c", metadata !"/a"} | ||
!2 = metadata !{} | ||
!3 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} | ||
!4 = metadata !{i32 2, metadata !"Debug Info Version", i32 1} | ||
!5 = metadata !{i32 1, metadata !"wchar_size", i32 4} | ||
!6 = metadata !{i32 1, metadata !"min_enum_size", i32 4} | ||
!7 = metadata !{metadata !"clang version 3.6.0 "} |
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,2 @@ | ||
if not 'ARM' in config.root.targets: | ||
config.unsupported = True |