138 lines · yaml
1# RUN: yaml2obj %s -o %t2# RUN: not llvm-jitlink -noexec %t 2>&1 | FileCheck %s3#4# Check that ptrauth edges are _not_ lowered for noalloc sections.5#6# Ptrauth edges are lowered to signing function instructions, so any ptrauth7# edge in a noalloc section will introduce signing instructions that operate8# illegally on linker working memory, rather than executor memory (this will9# usually lead to a crash, but may silently corrupt memory in in-process JITs).10#11# By ignoring these edges during ptrauth lowering we prevent illegal signing12# instructions from being generated, and the ptrauth edges error out in13# applyFixup instead.14#15 16# CHECK: llvm-jitlink error: {{.*}} unsupported edge kind Pointer64Authenticated17 18--- !mach-o19IsLittleEndian: true20FileHeader:21 magic: 0xFEEDFACF22 cputype: 0x100000C23 cpusubtype: 0x8000000224 filetype: 0x125 ncmds: 426 sizeofcmds: 44027 flags: 0x200028 reserved: 0x029LoadCommands:30 - cmd: LC_SEGMENT_6431 cmdsize: 31232 segname: ''33 vmaddr: 034 vmsize: 1635 fileoff: 47236 filesize: 1637 maxprot: 738 initprot: 739 nsects: 240 flags: 041 Sections:42 - sectname: __text43 segname: __TEXT44 addr: 0x045 size: 846 offset: 0x1D847 align: 248 reloff: 0x049 nreloc: 050 flags: 0x8000040051 reserved1: 0x052 reserved2: 0x053 reserved3: 0x054 content: 00008052C0035FD655 - sectname: __debug_stuff56 segname: __DWARF57 addr: 0x858 size: 859 offset: 0x1E060 align: 361 reloff: 0x1E862 nreloc: 163 flags: 0x200000064 reserved1: 0x065 reserved2: 0x066 reserved3: 0x067 content: '0000000000000080'68 relocations:69 - address: 0x070 symbolnum: 371 pcrel: false72 length: 373 extern: true74 type: 1175 scattered: false76 value: 077 - cmd: LC_BUILD_VERSION78 cmdsize: 2479 platform: 180 minos: 98304081 sdk: 082 ntools: 083 - cmd: LC_SYMTAB84 cmdsize: 2485 symoff: 49686 nsyms: 487 stroff: 56088 strsize: 2489 - cmd: LC_DYSYMTAB90 cmdsize: 8091 ilocalsym: 092 nlocalsym: 293 iextdefsym: 294 nextdefsym: 295 iundefsym: 496 nundefsym: 097 tocoff: 098 ntoc: 099 modtaboff: 0100 nmodtab: 0101 extrefsymoff: 0102 nextrefsyms: 0103 indirectsymoff: 0104 nindirectsyms: 0105 extreloff: 0106 nextrel: 0107 locreloff: 0108 nlocrel: 0109LinkEditData:110 NameList:111 - n_strx: 18112 n_type: 0xE113 n_sect: 1114 n_desc: 0115 n_value: 0116 - n_strx: 12117 n_type: 0xE118 n_sect: 2119 n_desc: 0120 n_value: 8121 - n_strx: 1122 n_type: 0xF123 n_sect: 2124 n_desc: 0125 n_value: 8126 - n_strx: 6127 n_type: 0xF128 n_sect: 1129 n_desc: 0130 n_value: 0131 StringTable:132 - ''133 - _foo134 - _main135 - ltmp1136 - ltmp0137...138