diff options
Diffstat (limited to 'test/mach-o/arm-shims.yaml')
-rw-r--r-- | test/mach-o/arm-shims.yaml | 83 |
1 files changed, 15 insertions, 68 deletions
diff --git a/test/mach-o/arm-shims.yaml b/test/mach-o/arm-shims.yaml index 68a401ca78e82..62739c967ab15 100644 --- a/test/mach-o/arm-shims.yaml +++ b/test/mach-o/arm-shims.yaml @@ -1,5 +1,6 @@ -# RUN: lld -flavor darwin -arch armv7 %s -dylib %p/Inputs/libSystem.yaml -o %t -# RUN: macho-dump --dump-section-data %t | FileCheck %s +# RUN: lld -flavor darwin -arch armv7 %s %p/Inputs/arm-shims.yaml \ +# RUN: -dylib %p/Inputs/libSystem.yaml -o %t +# RUN: llvm-readobj -s -sd %t | FileCheck %s # # Test b from arm to thumb or vice versa has shims added.s # @@ -66,74 +67,20 @@ undefined-symbols: scope: [ N_EXT ] value: 0x0000000000000000 - ---- !mach-o -arch: armv7 -file-type: MH_OBJECT -flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ] -sections: - - segment: __TEXT - section: __text - type: S_REGULAR - attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ] - alignment: 2 - address: 0x0000000000000000 - content: [ 0x00, 0xBF, 0xFF, 0xF7, 0xFE, 0xEF, 0xFF, 0xF7, - 0xFB, 0xBF, 0x00, 0x00, 0x00, 0xF0, 0x20, 0xE3, - 0xFA, 0xFF, 0xFF, 0xFA, 0xF9, 0xFF, 0xFF, 0xEA ] - relocations: - - offset: 0x00000014 - type: ARM_RELOC_BR24 - length: 2 - pc-rel: true - extern: true - symbol: 3 - - offset: 0x00000010 - type: ARM_RELOC_BR24 - length: 2 - pc-rel: true - extern: true - symbol: 3 - - offset: 0x00000006 - type: ARM_THUMB_RELOC_BR22 - length: 2 - pc-rel: true - extern: true - symbol: 2 - - offset: 0x00000002 - type: ARM_THUMB_RELOC_BR22 - length: 2 - pc-rel: true - extern: true - symbol: 2 -global-symbols: - - name: _a2 - type: N_SECT - scope: [ N_EXT ] - sect: 1 - value: 0x000000000000000C - - name: _t2 - type: N_SECT - scope: [ N_EXT ] - sect: 1 - desc: [ N_ARM_THUMB_DEF ] - value: 0x0000000000000000 -undefined-symbols: - - name: _a1 - type: N_UNDF - scope: [ N_EXT ] - value: 0x0000000000000000 - - name: _t1 - type: N_UNDF - scope: [ N_EXT ] - value: 0x0000000000000000 - ... - -# CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -# CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -# CHECK: ('_section_data', '00bf00f0 10e800f0 19b80000 00f020e3 000000fa 0f0000ea 00bffff7 f8ef00f0 07b80000 00f020e3 f4fffffa 050000ea dff804c0 ff446047 d4ffffff dff804c0 ff446047 e0ffffff 04c09fe5 0cc08fe0 1cff2fe1 adffffff 04c09fe5 0cc08fe0 1cff2fe1 b5ffffff') +# CHECK: Section { +# CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00) +# CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00) +# CHECK: SectionData ( +# CHECK: 0000: 00BF00F0 10E800F0 19B80000 00F020E3 +# CHECK: 0010: 000000FA 0F0000EA 00BFFFF7 F8EF00F0 +# CHECK: 0020: 07B80000 00F020E3 F4FFFFFA 050000EA +# CHECK: 0030: DFF804C0 FF446047 D4FFFFFF DFF804C0 +# CHECK: 0040: FF446047 E0FFFFFF 04C09FE5 0CC08FE0 +# CHECK: 0050: 1CFF2FE1 ADFFFFFF 04C09FE5 0CC08FE0 +# CHECK: 0060: 1CFF2FE1 B5FFFFFF +# CHECK: ) # When we get a good mach-o disassembler the above __text section content check can be change to be symbolic. |