mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
056055f8f6
This patch significantly improves the llvm-size testing. The changes made are: 1) Change all tests to use yaml2obj instead of assembly or pre-canned inputs. 2) Move the tests out of the X86 directory, since they don't need to be there after 1). 3) Increased test coverage. 4) Added comments to explain purpose of tests. I haven't attempted to add test coverage for all Mach-O related code, as I am not familiar enough with that file format to be able to. Reviewers: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D66134 llvm-svn: 368821
59 lines
1.5 KiB
Plaintext
59 lines
1.5 KiB
Plaintext
## Show that the -l option produces more verbose address and offset information
|
|
## for darwin format.
|
|
|
|
# RUN: yaml2obj %s -o %t
|
|
# RUN: llvm-size %t -m -l | FileCheck %s
|
|
|
|
# CHECK: Segment : 12 (vmaddr 0x0 fileoff 220)
|
|
# CHECK-NEXT: Section (__TEXT, __text): 4 (addr 0x0 offset 220)
|
|
# CHECK-NEXT: Section (__DATA, __data): 8 (addr 0x4 offset 224)
|
|
# CHECK-NEXT: total 12
|
|
# CHECK-NEXT: total 12
|
|
|
|
--- !mach-o
|
|
FileHeader:
|
|
magic: 0xFEEDFACE
|
|
cputype: 0x0000000C
|
|
cpusubtype: 0x00000009
|
|
filetype: 0x00000001
|
|
ncmds: 1
|
|
sizeofcmds: 192
|
|
flags: 0x00000000
|
|
LoadCommands:
|
|
- cmd: LC_SEGMENT
|
|
cmdsize: 192
|
|
segname: ''
|
|
vmaddr: 0
|
|
vmsize: 12
|
|
fileoff: 220
|
|
filesize: 12
|
|
maxprot: 7
|
|
initprot: 7
|
|
nsects: 2
|
|
flags: 0
|
|
Sections:
|
|
- sectname: __text
|
|
segname: __TEXT
|
|
addr: 0x0000000000000000
|
|
size: 4
|
|
offset: 0x000000DC
|
|
align: 0
|
|
reloff: 0x00000000
|
|
nreloc: 0
|
|
flags: 0x80000000
|
|
reserved1: 0x00000000
|
|
reserved2: 0x00000000
|
|
reserved3: 0x00000000
|
|
- sectname: __data
|
|
segname: __DATA
|
|
addr: 0x0000000000000004
|
|
size: 8
|
|
offset: 0x000000E0
|
|
align: 0
|
|
reloff: 0x00000000
|
|
nreloc: 0
|
|
flags: 0x00000000
|
|
reserved1: 0x00000000
|
|
reserved2: 0x00000000
|
|
reserved3: 0x00000000
|