File tree Expand file tree Collapse file tree 2 files changed +38
-4
lines changed Expand file tree Collapse file tree 2 files changed +38
-4
lines changed Original file line number Diff line number Diff line change @@ -1191,10 +1191,12 @@ void Writer::createMiscChunks() {
1191
1191
}
1192
1192
1193
1193
// Create thunks for locally-dllimported symbols.
1194
- if (!ctx.symtab .localImportChunks .empty ()) {
1195
- for (Chunk *c : ctx.symtab .localImportChunks )
1196
- rdataSec->addChunk (c);
1197
- }
1194
+ ctx.forEachSymtab ([&](SymbolTable &symtab) {
1195
+ if (!symtab.localImportChunks .empty ()) {
1196
+ for (Chunk *c : symtab.localImportChunks )
1197
+ rdataSec->addChunk (c);
1198
+ }
1199
+ });
1198
1200
1199
1201
// Create Debug Information Chunks
1200
1202
debugInfoSec = config->mingw ? buildidSec : rdataSec;
Original file line number Diff line number Diff line change
1
+ // REQUIRES: aarch64
2
+
3
+ // RUN: llvm-mc -filetype=obj -triple=aarch64-windows %s -o %t.arm64.obj
4
+ // RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %s -o %t.arm64ec.obj
5
+
6
+ // RUN: lld-link -machine:arm64x -dll -noentry %t.arm64.obj %t.arm64ec.obj -out:%t.dll 2>&1 | FileCheck --check-prefix=WARN %s
7
+ // WARN: lld-link: warning: {{.*}}.arm64.obj: locally defined symbol imported: func
8
+ // WARN-NEXT: lld-link: warning: {{.*}}.arm64ec.obj: locally defined symbol imported: func
9
+
10
+ // RUN: llvm-readobj --hex-dump=.test %t.dll | FileCheck --check-prefix=TEST %s
11
+ // TEST: 0x180005000 00300000 08300000
12
+
13
+ // RUN: llvm-readobj --coff-basereloc %t.dll | FileCheck --check-prefix=RELOCS %s
14
+ // RELOCS: Entry {
15
+ // RELOCS-NEXT: Type: DIR64
16
+ // RELOCS-NEXT: Address: 0x3000
17
+ // RELOCS-NEXT: }
18
+ // RELOCS-NEXT: Entry {
19
+ // RELOCS-NEXT: Type: DIR64
20
+ // RELOCS-NEXT: Address: 0x3008
21
+ // RELOCS-NEXT: }
22
+
23
+ // RUN: llvm-readobj --hex-dump=.rdata %t.dll | FileCheck --check-prefix=RDATA %s
24
+ // RDATA: 0x180003000 00100080 01000000 00200080 01000000
25
+
26
+ .text
27
+ .globl func
28
+ func:
29
+ ret
30
+
31
+ .section .test , "r"
32
+ .rva __imp_func
You can’t perform that action at this time.
0 commit comments