brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 3295b3f Raw
81 lines · plain
1// REQUIRES: aarch64, x862// RUN: split-file %s %t.dir && cd %t.dir3 4// RUN: llvm-mc -filetype=obj -triple=aarch64-windows ctor1-arm64.s -o ctor1-arm64.obj5// RUN: llvm-mc -filetype=obj -triple=aarch64-windows ctor2-arm64.s -o ctor2-arm64.obj6// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows ctor1-arm64ec.s -o ctor1-arm64ec.obj7// RUN: llvm-mc -filetype=obj -triple=x86_64-windows ctor2-amd64.s -o ctor2-amd64.obj8// RUN: llvm-mc -filetype=obj -triple=aarch64-windows test.s -o test-arm64.obj9// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows test.s -o test-arm64ec.obj10 11// Check that .ctors and .dtors chunks are correctly sorted and that EC and native chunks are split.12 13// RUN: lld-link -out:out.dll -machine:arm64x -lldmingw -dll -noentry test-arm64.obj test-arm64ec.obj \14// RUN:           ctor1-arm64.obj ctor2-arm64.obj ctor1-arm64ec.obj ctor2-amd64.obj15// RUN: llvm-readobj --hex-dump=.rdata --hex-dump=.test out.dll | FileCheck %s16 17// RUN: lld-link -out:out2.dll -machine:arm64x -lldmingw -dll -noentry test-arm64.obj test-arm64ec.obj \18// RUN:           ctor1-arm64ec.obj ctor2-amd64.obj ctor1-arm64.obj ctor2-arm64.obj19// RUN: llvm-readobj --hex-dump=.rdata --hex-dump=.test out2.dll | FileCheck %s20 21// RUN: lld-link -out:out3.dll -machine:arm64x -lldmingw -dll -noentry test-arm64.obj test-arm64ec.obj \22// RUN:           ctor2-arm64.obj ctor1-arm64ec.obj ctor2-amd64.obj ctor1-arm64.obj23// RUN: llvm-readobj --hex-dump=.rdata --hex-dump=.test out3.dll | FileCheck %s24 25// RUN: lld-link -out:out4.dll -machine:arm64ec -lldmingw -dll -noentry test-arm64.obj test-arm64ec.obj \26// RUN:           ctor2-arm64.obj ctor1-arm64ec.obj ctor2-amd64.obj ctor1-arm64.obj27// RUN: llvm-readobj --hex-dump=.rdata --hex-dump=.test out4.dll | FileCheck %s28 29// CHECK:      Hex dump of section '.rdata':30// CHECK-NEXT: 0x180001000 ffffffff ffffffff 01000000 0000000031// CHECK-NEXT: 0x180001010 02000000 00000000 03000000 0000000032// CHECK-NEXT: 0x180001020 00000000 00000000 ffffffff ffffffff33// CHECK-NEXT: 0x180001030 11000000 00000000 12000000 0000000034// CHECK-NEXT: 0x180001040 13000000 00000000 00000000 0000000035// CHECK-NEXT: 0x180001050 ffffffff ffffffff 01010000 0000000036// CHECK-NEXT: 0x180001060 02010000 00000000 03010000 0000000037// CHECK-NEXT: 0x180001070 00000000 00000000 ffffffff ffffffff38// CHECK-NEXT: 0x180001080 11010000 00000000 12010000 0000000039// CHECK-NEXT: 0x180001090 13010000 00000000 00000000 0000000040// CHECK-EMPTY:41// CHECK-NEXT: Hex dump of section '.test':42// CHECK-NEXT: 0x180003000 00100000 50100000 28100000 7810000043 44#--- ctor1-arm64.s45        .section .ctors.1,"drw"46        .xword 147        .section .ctors.3,"drw"48        .xword 349        .section .dtors.1,"drw"50        .xword 0x10151        .section .dtors.3,"drw"52        .xword 0x10353 54#--- ctor2-arm64.s55        .section .ctors.2,"drw"56        .xword 257        .section .dtors.2,"drw"58        .xword 0x10259 60#--- ctor1-arm64ec.s61        .section .ctors.1,"drw"62        .xword 0x1163        .section .ctors.3,"drw"64        .xword 0x1365        .section .dtors.1,"drw"66        .xword 0x11167        .section .dtors.3,"drw"68        .xword 0x11369 70#--- ctor2-amd64.s71        .section .ctors.2,"drw"72        .quad 0x1273        .section .dtors.2,"drw"74        .quad 0x11275 76#--- test.s77        .section .test78        .rva __CTOR_LIST__79        .rva __DTOR_LIST__80 81