brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · 670ee39 Raw
115 lines · plain
1REQUIRES: aarch642RUN: split-file %s %t.dir && cd %t.dir3 4#--- text-func.s5    .text6    .globl func7    .p2align 2, 0x08func:9    mov w0, #110    ret11 12    .section .wowthk$aa,"xr",discard,thunk13    .globl thunk14    .p2align 215thunk:16    ret17 18    .section .hybmp$x,"yi"19    .symidx func20    .symidx thunk21    .word 1  // entry thunk22 23// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows text-func.s -o text-func.obj24// RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll text-func.obj 2>&1 | FileCheck -check-prefix=FUNC-NON-COMDAT %s25// FUNC-NON-COMDAT: error: non COMDAT symbol 'func' in hybrid map26 27#--- offset-func.s28    .section .text,"xr",discard,func29    // Add an instruction before func label to make adding entry thunk offset in the padding impossible.30    mov w0, #231    .globl func32    .p2align 2, 0x033func:34    mov w0, #135    ret36 37    .section .wowthk$aa,"xr",discard,thunk38    .globl thunk39    .p2align 240thunk:41    ret42 43    .section .hybmp$x,"yi"44    .symidx func45    .symidx thunk46    .word 1  // entry thunk47 48// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows offset-func.s -o offset-func.obj49// RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll offset-func.obj 2>&1 | FileCheck -check-prefix=FUNC-NON-COMDAT %s50 51#--- undef-func.s52    .section .wowthk$aa,"xr",discard,thunk53    .globl thunk54    .p2align 255thunk:56    ret57 58    .section .hybmp$x,"yi"59    .symidx func60    .symidx thunk61    .word 1  // entry thunk62 63// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows undef-func.s -o undef-func.obj64// RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll undef-func.obj 2>&1 | FileCheck -check-prefix=UNDEF-FUNC %s65// UNDEF-FUNC: error: undefined symbol: func (EC symbol)66 67#--- undef-thunk.s68    .section .text,"xr",discard,func69    .globl func70    .p2align 2, 0x071func:72    mov w0, #173    ret74 75    .section .hybmp$x,"yi"76    .symidx func77    .symidx thunk78    .word 1  // entry thunk79 80// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows undef-thunk.s -o undef-thunk.obj81// RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll undef-thunk.obj 2>&1 | FileCheck -check-prefix=UNDEF-THUNK %s82// UNDEF-THUNK: error: undefined symbol: thunk (EC symbol)83 84#--- invalid-type.s85    .section .text,"xr",discard,func86    .globl func87    .p2align 2, 0x088func:89    mov w0, #190    ret91 92    .section .wowthk$aa,"xr",discard,thunk93    .globl thunk94    .p2align 295thunk:96    ret97 98    .section .hybmp$x,"yi"99    .symidx func100    .symidx thunk101    .word 3102 103// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows invalid-type.s -o invalid-type.obj104// RUN: lld-link -machine:arm64ec -dll -noentry -out:test.dll invalid-type.obj 2>&1 | FileCheck -check-prefix=INVALID-TYPE %s105// INVALID-TYPE: warning: Ignoring unknown EC thunk type 3106 107#--- invalid-size.s108    .section .hybmp$x,"yi"109    .symidx func110    .symidx thunk111 112// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows invalid-size.s -o invalid-size.obj113// RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll invalid-size.obj 2>&1 | FileCheck -check-prefix=INVALID-SIZE %s114// INVALID-SIZE: error: Invalid .hybmp chunk size 8115