Skip to content

[LLD][COFF][NFC] Use CHPE version 2 in tests #109872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions lld/test/COFF/Inputs/loadconfig-arm64ec.s
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ __os_arm64x_check_icall_cfg:
.xword 0
__os_arm64x_dispatch_fptr:
.xword 0
__os_arm64x_helper0:
.xword 0
__os_arm64x_helper1:
.xword 0
__os_arm64x_helper2:
.xword 0
__os_arm64x_helper3:
.xword 0
__os_arm64x_helper4:
Expand All @@ -65,7 +59,7 @@ __os_arm64x_helper8:
.globl __chpe_metadata
.p2align 3, 0
__chpe_metadata:
.word 1
.word 2
.rva __hybrid_code_map
.word __hybrid_code_map_count
.rva __x64_code_ranges_to_entry_points
Expand All @@ -85,9 +79,9 @@ __chpe_metadata:
.word __arm64x_extra_rfe_table_size
.rva __os_arm64x_dispatch_fptr
.rva __hybrid_auxiliary_iat_copy
.rva __os_arm64x_helper0
.rva __os_arm64x_helper1
.rva __os_arm64x_helper2
.word 0 // __hybrid_auxiliary_delayload_iat
.word 0 // __hybrid_auxiliary_delayload_iat_copy
.word 0 // __hybrid_image_info_bitfield
.rva __os_arm64x_helper3
.rva __os_arm64x_helper4
.rva __os_arm64x_helper5
Expand Down
29 changes: 14 additions & 15 deletions lld/test/COFF/arm64ec-import.test
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN: llvm-readobj --coff-imports out2.dll | FileCheck --check-prefix=IMPORTS %s
RUN: llvm-readobj --coff-imports out3.dll | FileCheck -check-prefix=IMPORTS %s
IMPORTS: Import {
IMPORTS-NEXT: Name: test.dll
IMPORTS-NEXT: ImportLookupTableRVA: 0x4230
IMPORTS-NEXT: ImportLookupTableRVA: 0x4218
IMPORTS-NEXT: ImportAddressTableRVA: 0x3000
IMPORTS-NEXT: Symbol: data (0)
IMPORTS-NEXT: Symbol: func (0)
Expand Down Expand Up @@ -79,13 +79,13 @@ RUN: llvm-readobj --hex-dump=.test out2.dll | FileCheck --check-prefix=TESTSEC %
TESTSEC: 0x180007000 08500000 00300000 10500000 20500000
TESTSEC-NEXT: 0x180007010 08300000 00500000 10300000 20300000
TESTSEC-NEXT: 0x180007020 14100000 28100000 00200000 08100000
TESTSEC-NEXT: 0x180007030 3c100000 a0420000
TESTSEC-NEXT: 0x180007030 3c100000 88420000

RUN: llvm-readobj --hex-dump=.test out3.dll | FileCheck -check-prefix=TESTSEC-X64 %s
TESTSEC-X64: 0x180007000 08300000 00300000 10300000 20300000
TESTSEC-X64-NEXT: 0x180007010 08300000 00500000 10300000 20300000
TESTSEC-X64-NEXT: 0x180007020 14100000 28100000 00200000 08100000
TESTSEC-X64-NEXT: 0x180007030 3c100000 a0420000
TESTSEC-X64-NEXT: 0x180007030 3c100000 88420000

RUN: FileCheck --check-prefix=MAP %s < out.map
RUN: FileCheck --check-prefix=MAP %s < out2.map
Expand All @@ -100,10 +100,10 @@ MAP-NEXT: 0002:00000000 __imp_data 0000000180003000 te
MAP-NEXT: 0002:00000008 __imp_aux_func 0000000180003008 test{{.*}}:test.dll
MAP-NEXT: 0002:00000010 __imp_aux_func2 0000000180003010 test{{.*}}:test.dll
MAP-NEXT: 0002:00000020 __imp_aux_t2func 0000000180003020 test2{{.*}}:test2.dll
MAP: 0002:00001298 __auximpcopy_data 0000000180004298 test{{.*}}:test.dll
MAP-NEXT: 0002:000012a0 __auximpcopy_func 00000001800042a0 test{{.*}}:test.dll
MAP-NEXT: 0002:000012a8 __auximpcopy_func2 00000001800042a8 test{{.*}}:test.dll
MAP-NEXT: 0002:000012b8 __auximpcopy_t2func 00000001800042b8 test2{{.*}}:test2.dll
MAP: 0002:00001280 __auximpcopy_data 0000000180004280 test{{.*}}:test.dll
MAP-NEXT: 0002:00001288 __auximpcopy_func 0000000180004288 test{{.*}}:test.dll
MAP-NEXT: 0002:00001290 __auximpcopy_func2 0000000180004290 test{{.*}}:test.dll
MAP-NEXT: 0002:000012a0 __auximpcopy_t2func 00000001800042a0 test2{{.*}}:test2.dll
MAP: 0002:00002000 __imp_aux_data 0000000180005000 test{{.*}}:test.dll
MAP-NEXT: 0002:00002008 __imp_func 0000000180005008 test{{.*}}:test.dll
MAP-NEXT: 0002:00002010 __imp_func2 0000000180005010 test{{.*}}:test.dll
Expand All @@ -120,15 +120,14 @@ RUN: llvm-readobj --coff-load-config out.dll | FileCheck -check-prefix=LOADCONFI
RUN: llvm-readobj --coff-load-config out2.dll | FileCheck -check-prefix=LOADCONFIG %s
RUN: llvm-readobj --coff-load-config out3.dll | FileCheck -check-prefix=LOADCONFIG %s
LOADCONFIG: AuxiliaryIAT: 0x5000
LOADCONFIG: AuxiliaryIATCopy: 0x4298
LOADCONFIG: AuxiliaryIATCopy: 0x4280

RUN: llvm-readobj --hex-dump=.rdata out.dll | FileCheck -check-prefix=RDATA %s
RUN: llvm-readobj --hex-dump=.rdata out2.dll | FileCheck -check-prefix=RDATA %s
RUN: llvm-readobj --hex-dump=.rdata out3.dll | FileCheck -check-prefix=RDATA %s
RDATA: 0x180004290 2e646c6c 00000000 00000000 00000000
RDATA-NEXT: 0x1800042a0 14100080 01000000 28100080 01000000
RDATA-NEXT: 0x1800042b0 00000000 00000000 48100080 01000000
RDATA-NEXT: 0x1800042c0 00000000 00000000 00000000 00000000
RDATA: 0x180004280 00000000 00000000 14100080 01000000
RDATA-NEXT: 0x180004290 28100080 01000000 00000000 00000000
RDATA-NEXT: 0x1800042a0 48100080 01000000 00000000 00000000
RDATA: 0x180005000 00000000 00000000 14100080 01000000
RDATA-NEXT: 0x180005010 28100080 01000000 00000000 00000000
RDATA-NEXT: 0x180005020 48100080 01000000 00000000 00000000
Expand All @@ -138,15 +137,15 @@ RUN: llvm-readobj --coff-basereloc out2.dll | FileCheck -check-prefix=BASERELOC
RUN: llvm-readobj --coff-basereloc out3.dll | FileCheck -check-prefix=BASERELOC %s
BASERELOC: BaseReloc [
Aux IAT copy:
BASERELOC: Address: 0x42A0
BASERELOC: Address: 0x4288
BASERELOC-NEXT: }
BASERELOC-NEXT: Entry {
BASERELOC-NEXT: Type: DIR64
BASERELOC-NEXT: Address: 0x42A8
BASERELOC-NEXT: Address: 0x4290
BASERELOC-NEXT: }
BASERELOC-NEXT: Entry {
BASERELOC-NEXT: Type: DIR64
BASERELOC-NEXT: Address: 0x42B8
BASERELOC-NEXT: Address: 0x42A0
BASERELOC-NEXT: }
Aux IAT:
BASERELOC-NOT: Address: 0x5000
Expand Down
Loading