1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[llvm-readobj] Test --macho-data-in-code option.

As added bonus this converts an existing test from macho-dump to 
llvm-readobj. Only 66 to go.

llvm-svn: 245791
This commit is contained in:
Davide Italiano 2015-08-22 20:30:56 +00:00
parent 2549889c79
commit ee5050500d

View File

@ -1,23 +1,6 @@
@ RUN: llvm-mc -triple armv7-apple-darwin10 -filetype=obj -o - < %s | macho-dump | FileCheck %s
@ RUN: llvm-mc -triple armv7-apple-darwin10 -filetype=obj -o - < %s | llvm-readobj --macho-data-in-code | FileCheck %s
.text
_foo:
@ CHECK: # DICE 0
@ CHECK: ('offset', 0)
@ CHECK: ('length', 4)
@ CHECK: ('kind', 1)
@ CHECK: # DICE 1
@ CHECK: ('offset', 4)
@ CHECK: ('length', 4)
@ CHECK: ('kind', 4)
@ CHECK: # DICE 2
@ CHECK: ('offset', 8)
@ CHECK: ('length', 2)
@ CHECK: ('kind', 3)
@ CHECK: # DICE 3
@ CHECK: ('offset', 10)
@ CHECK: ('length', 1)
@ CHECK: ('kind', 2)
.data_region
.long 10
.end_data_region
@ -31,3 +14,37 @@ _foo:
.byte 3
.end_data_region
@ CHECK: File: <stdin>
@ CHECK: Format: Mach-O arm
@ CHECK: Arch: arm
@ CHECK: AddressSize: 32bit
@ CHECK: DataInCode {
@ CHECK: Data offset: 300
@ CHECK: Data size: 32
@ CHECK: Data entries [
@ CHECK: Entry {
@ CHECK: Index: 0
@ CHECK: Offset: 0
@ CHECK: Length: 4
@ CHECK: Kind: 1
@ CHECK: }
@ CHECK: Entry {
@ CHECK: Index: 1
@ CHECK: Offset: 4
@ CHECK: Length: 4
@ CHECK: Kind: 4
@ CHECK: }
@ CHECK: Entry {
@ CHECK: Index: 2
@ CHECK: Offset: 8
@ CHECK: Length: 2
@ CHECK: Kind: 3
@ CHECK: }
@ CHECK: Entry {
@ CHECK: Index: 3
@ CHECK: Offset: 10
@ CHECK: Length: 1
@ CHECK: Kind: 2
@ CHECK: }
@ CHECK: ]
@ CHECK: }