Repository navigation
[LLD][COFF] Replace ARM64EC TLS directory chunks with native chunks when available - #212845
Conversation
|
@llvm/pr-subscribers-lld @llvm/pr-subscribers-lld-coff Author: Jacek Caban (cjacek) ChangesFollowing MSVC, we don't emit separate TLS directories for EC and native views and instead use native one for both. CRT uses -arm64xsameaddress feature to ensure that it works well for callbacks. Additionally, linker needs to replace EC symbols with native ones to ensure that object files reference them as expected. Even through EC symbols end up being unused, they still need to be present and defined, so the replacement happens after symbols are resolved. MSVC seems to have some dedicated logic to skip chunks defining EC _tls_used and _tls_index symbols. The logic seems incomplete; for example, if the same chunks defines more symbols, those symbols become equal to __ImageBase (0 RVA). Instead of trying to replicate that, I made sure that GC has a chance to clean up such sections. 2 Files Affected:
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 4eedefbf2ba5e..dc3fd46323032 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -2805,10 +2805,6 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
ltoCompilationDone = true;
ctx.forEachSymtab([](SymbolTable &symtab) { symtab.compileBitcodeFiles(); });
- if (Defined *d =
- dyn_cast_or_null<Defined>(ctx.symtab.findUnderscore("_tls_used")))
- config->gcroot.push_back(d);
-
// If -thinlto-index-only is given, we should create only "index
// files" and not object files. Index file creation is already done
// in addCombinedLTOObject, so we are done if that's the case.
@@ -2837,6 +2833,23 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
if (errorCount())
return;
+ if (ctx.hybridSymtab) {
+ // On ARM64X, use native _tls_used and _tls_index for both views.
+ auto maybeReplaceWithNative = [&](StringRef name) {
+ Symbol *nativeSym = ctx.hybridSymtab->findUnderscore(name);
+ if (!nativeSym || !nativeSym->getDefined())
+ return;
+ if (Symbol *ecSym = ctx.symtab.findUnderscore(name))
+ ecSym->replaceKeepingName(nativeSym, sizeof(SymbolUnion));
+ };
+ maybeReplaceWithNative("_tls_used");
+ maybeReplaceWithNative("_tls_index");
+ }
+
+ if (Defined *d =
+ dyn_cast_or_null<Defined>(ctx.symtab.findUnderscore("_tls_used")))
+ config->gcroot.push_back(d);
+
ctx.forEachActiveSymtab([](SymbolTable &symtab) {
symtab.initializeECThunks();
symtab.initializeLoadConfig();
diff --git a/lld/test/COFF/arm64x-tls.s b/lld/test/COFF/arm64x-tls.s
new file mode 100644
index 0000000000000..21ff0ab26d2af
--- /dev/null
+++ b/lld/test/COFF/arm64x-tls.s
@@ -0,0 +1,104 @@
+// REQUIRES: aarch64
+// RUN: split-file %s %t.dir && cd %t.dir
+
+// RUN: llvm-mc -filetype=obj -triple=aarch64-windows aarch64.s -o aarch64.obj
+// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows arm64ec.s -o arm64ec.obj
+// RUN: llvm-mc -filetype=obj -triple=aarch64-windows tls-aarch64.s -o tls-aarch64.obj
+// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows tls-arm64ec.s -o tls-arm64ec.obj
+// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %S/Inputs/loadconfig-arm64ec.s -o loadconfig-arm64ec.obj
+// RUN: llvm-mc -filetype=obj -triple=aarch64-windows %S/Inputs/loadconfig-arm64.s -o loadconfig-arm64.obj
+
+// RUN: rm -f tls.lib
+// RUN: llvm-lib -machine:arm64x -out:tls.lib tls-aarch64.obj tls-arm64ec.obj loadconfig-arm64ec.obj loadconfig-arm64.obj
+// RUN: lld-link -machine:arm64x -dll -noentry aarch64.obj arm64ec.obj tls.lib -out:out.dll
+
+// Check that we're using native _tls_index and _tls_used for both views.
+
+// RUN: llvm-readobj --coff-tls-directory --hex-dump=.ec --hex-dump=.a64 out.dll | FileCheck %s
+// CHECK: Format: COFF-ARM64X
+// CHECK-NEXT: Arch: aarch64
+// CHECK-NEXT: AddressSize: 64bit
+// CHECK-EMPTY:
+// CHECK-NEXT: Hex dump of section '.a64':
+// CHECK-NEXT: 0x180004000 00500000 04500000
+// CHECK-EMPTY:
+// CHECK-NEXT: Hex dump of section '.ec':
+// CHECK-NEXT: 0x180006000 00500000 04500000
+// CHECK-NEXT: TLSDirectory {
+// CHECK-NEXT: StartAddressOfRawData: 0x0
+// CHECK-NEXT: EndAddressOfRawData: 0x0
+// CHECK-NEXT: AddressOfIndex: 0x180005000
+// CHECK-NEXT: AddressOfCallBacks: 0x0
+// CHECK-NEXT: SizeOfZeroFill: 0x0
+// CHECK-NEXT: Characteristics [ (0x0)
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: HybridObject {
+// CHECK-NEXT: Format: COFF-ARM64EC
+// CHECK-NEXT: Arch: aarch64
+// CHECK-NEXT: AddressSize: 64bit
+// CHECK-EMPTY:
+// CHECK-NEXT: Hex dump of section '.a64':
+// CHECK-NEXT: 0x180004000 00500000 04500000
+// CHECK-EMPTY:
+// CHECK-NEXT: Hex dump of section '.ec':
+// CHECK-NEXT: 0x180006000 00500000 04500000
+// CHECK-NEXT: TLSDirectory {
+// CHECK-NEXT: StartAddressOfRawData: 0x0
+// CHECK-NEXT: EndAddressOfRawData: 0x0
+// CHECK-NEXT: AddressOfIndex: 0x180005000
+// CHECK-NEXT: AddressOfCallBacks: 0x0
+// CHECK-NEXT: SizeOfZeroFill: 0x0
+// CHECK-NEXT: Characteristics [ (0x0)
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+
+// Check that EC _tls_index and _tls_used pull the object file, but their chunks are collected by GC.
+// RUN: llvm-readobj --sections out.dll | FileCheck --check-prefix=DEFEC %s
+// DEFEC-NOT: defec
+// DEFEC: .test
+// DEFEC-NOT: defec
+
+#--- tls-aarch64.s
+ .section .defa64,"dr",discard,_tls_index
+ .globl _tls_index
+_tls_index:
+ .long 0
+
+ .section .defa64,"dr",discard,_tls_used
+ .globl _tls_used
+_tls_used:
+ .xword 0
+ .xword 0
+ .xword _tls_index
+ .xword 0
+ .xword 0
+
+#--- aarch64.s
+ .section .a64,"dr"
+ .rva _tls_index
+ .rva _tls_used
+
+#--- tls-arm64ec.s
+ .section .defec,"dr",discard,_tls_index
+ .globl _tls_index
+_tls_index:
+ .long 0
+
+ .section .defec,"dr",discard,_tls_used
+ .globl _tls_used
+_tls_used:
+ .xword 1
+ .xword 1
+ .xword _tls_index
+ .xword 1
+ .xword 1
+
+ .section .test
+ .long 0
+
+#--- arm64ec.s
+ .section .ec,"dr"
+ .rva _tls_index
+ .rva _tls_used
|
|
@llvm/pr-subscribers-platform-windows Author: Jacek Caban (cjacek) ChangesFollowing MSVC, we don't emit separate TLS directories for EC and native views and instead use native one for both. CRT uses -arm64xsameaddress feature to ensure that it works well for callbacks. Additionally, linker needs to replace EC symbols with native ones to ensure that object files reference them as expected. Even through EC symbols end up being unused, they still need to be present and defined, so the replacement happens after symbols are resolved. MSVC seems to have some dedicated logic to skip chunks defining EC _tls_used and _tls_index symbols. The logic seems incomplete; for example, if the same chunks defines more symbols, those symbols become equal to __ImageBase (0 RVA). Instead of trying to replicate that, I made sure that GC has a chance to clean up such sections. 2 Files Affected:
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 4eedefbf2ba5e..dc3fd46323032 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -2805,10 +2805,6 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
ltoCompilationDone = true;
ctx.forEachSymtab([](SymbolTable &symtab) { symtab.compileBitcodeFiles(); });
- if (Defined *d =
- dyn_cast_or_null<Defined>(ctx.symtab.findUnderscore("_tls_used")))
- config->gcroot.push_back(d);
-
// If -thinlto-index-only is given, we should create only "index
// files" and not object files. Index file creation is already done
// in addCombinedLTOObject, so we are done if that's the case.
@@ -2837,6 +2833,23 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
if (errorCount())
return;
+ if (ctx.hybridSymtab) {
+ // On ARM64X, use native _tls_used and _tls_index for both views.
+ auto maybeReplaceWithNative = [&](StringRef name) {
+ Symbol *nativeSym = ctx.hybridSymtab->findUnderscore(name);
+ if (!nativeSym || !nativeSym->getDefined())
+ return;
+ if (Symbol *ecSym = ctx.symtab.findUnderscore(name))
+ ecSym->replaceKeepingName(nativeSym, sizeof(SymbolUnion));
+ };
+ maybeReplaceWithNative("_tls_used");
+ maybeReplaceWithNative("_tls_index");
+ }
+
+ if (Defined *d =
+ dyn_cast_or_null<Defined>(ctx.symtab.findUnderscore("_tls_used")))
+ config->gcroot.push_back(d);
+
ctx.forEachActiveSymtab([](SymbolTable &symtab) {
symtab.initializeECThunks();
symtab.initializeLoadConfig();
diff --git a/lld/test/COFF/arm64x-tls.s b/lld/test/COFF/arm64x-tls.s
new file mode 100644
index 0000000000000..21ff0ab26d2af
--- /dev/null
+++ b/lld/test/COFF/arm64x-tls.s
@@ -0,0 +1,104 @@
+// REQUIRES: aarch64
+// RUN: split-file %s %t.dir && cd %t.dir
+
+// RUN: llvm-mc -filetype=obj -triple=aarch64-windows aarch64.s -o aarch64.obj
+// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows arm64ec.s -o arm64ec.obj
+// RUN: llvm-mc -filetype=obj -triple=aarch64-windows tls-aarch64.s -o tls-aarch64.obj
+// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows tls-arm64ec.s -o tls-arm64ec.obj
+// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %S/Inputs/loadconfig-arm64ec.s -o loadconfig-arm64ec.obj
+// RUN: llvm-mc -filetype=obj -triple=aarch64-windows %S/Inputs/loadconfig-arm64.s -o loadconfig-arm64.obj
+
+// RUN: rm -f tls.lib
+// RUN: llvm-lib -machine:arm64x -out:tls.lib tls-aarch64.obj tls-arm64ec.obj loadconfig-arm64ec.obj loadconfig-arm64.obj
+// RUN: lld-link -machine:arm64x -dll -noentry aarch64.obj arm64ec.obj tls.lib -out:out.dll
+
+// Check that we're using native _tls_index and _tls_used for both views.
+
+// RUN: llvm-readobj --coff-tls-directory --hex-dump=.ec --hex-dump=.a64 out.dll | FileCheck %s
+// CHECK: Format: COFF-ARM64X
+// CHECK-NEXT: Arch: aarch64
+// CHECK-NEXT: AddressSize: 64bit
+// CHECK-EMPTY:
+// CHECK-NEXT: Hex dump of section '.a64':
+// CHECK-NEXT: 0x180004000 00500000 04500000
+// CHECK-EMPTY:
+// CHECK-NEXT: Hex dump of section '.ec':
+// CHECK-NEXT: 0x180006000 00500000 04500000
+// CHECK-NEXT: TLSDirectory {
+// CHECK-NEXT: StartAddressOfRawData: 0x0
+// CHECK-NEXT: EndAddressOfRawData: 0x0
+// CHECK-NEXT: AddressOfIndex: 0x180005000
+// CHECK-NEXT: AddressOfCallBacks: 0x0
+// CHECK-NEXT: SizeOfZeroFill: 0x0
+// CHECK-NEXT: Characteristics [ (0x0)
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: HybridObject {
+// CHECK-NEXT: Format: COFF-ARM64EC
+// CHECK-NEXT: Arch: aarch64
+// CHECK-NEXT: AddressSize: 64bit
+// CHECK-EMPTY:
+// CHECK-NEXT: Hex dump of section '.a64':
+// CHECK-NEXT: 0x180004000 00500000 04500000
+// CHECK-EMPTY:
+// CHECK-NEXT: Hex dump of section '.ec':
+// CHECK-NEXT: 0x180006000 00500000 04500000
+// CHECK-NEXT: TLSDirectory {
+// CHECK-NEXT: StartAddressOfRawData: 0x0
+// CHECK-NEXT: EndAddressOfRawData: 0x0
+// CHECK-NEXT: AddressOfIndex: 0x180005000
+// CHECK-NEXT: AddressOfCallBacks: 0x0
+// CHECK-NEXT: SizeOfZeroFill: 0x0
+// CHECK-NEXT: Characteristics [ (0x0)
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+
+// Check that EC _tls_index and _tls_used pull the object file, but their chunks are collected by GC.
+// RUN: llvm-readobj --sections out.dll | FileCheck --check-prefix=DEFEC %s
+// DEFEC-NOT: defec
+// DEFEC: .test
+// DEFEC-NOT: defec
+
+#--- tls-aarch64.s
+ .section .defa64,"dr",discard,_tls_index
+ .globl _tls_index
+_tls_index:
+ .long 0
+
+ .section .defa64,"dr",discard,_tls_used
+ .globl _tls_used
+_tls_used:
+ .xword 0
+ .xword 0
+ .xword _tls_index
+ .xword 0
+ .xword 0
+
+#--- aarch64.s
+ .section .a64,"dr"
+ .rva _tls_index
+ .rva _tls_used
+
+#--- tls-arm64ec.s
+ .section .defec,"dr",discard,_tls_index
+ .globl _tls_index
+_tls_index:
+ .long 0
+
+ .section .defec,"dr",discard,_tls_used
+ .globl _tls_used
+_tls_used:
+ .xword 1
+ .xword 1
+ .xword _tls_index
+ .xword 1
+ .xword 1
+
+ .section .test
+ .long 0
+
+#--- arm64ec.s
+ .section .ec,"dr"
+ .rva _tls_index
+ .rva _tls_used
|
|
It would be good to add (included in the commit message), that this feels roundabout, and it would seem more straightforward to just redirect the TLS directory entry to the EC version with a dynamic relocation, just like is done for other directories - this wouldn't need any trickery about replacing symbols and Out of curiosity - did you try fixing this with a dynamic relocation, or would you be open to trying doing that? It would be nice to have as reference, even if I agree that we probably should go with this solution. |
|
FWIW, this is not just counter-intuitive, but I feel like MSVC approach is just fragile and not entirely correct. The Yes, I have an alternative solution, see cjacek@f0897c7. As far as I tested, that seems to work fine. In fact, I like that solution more, but I can't guarantee that there are subtle problems, either with Windows loader or MSVC libs, that I'm missing in my testing (and led MSVC devs to use the other approach)... |
Those are indeed really good points. It would be great if someone from MS would be able to comment on this - although I'm not sure how much they've been willing to tell about the ARM64X implementation details though. CC @pmsjt @dpaoliello
Indeed, I also like that approach much more. But I also want to avoid subtle bugs due to handling this in a different way... If we practically can't figure out a case when the simpler and more robust solution wouldn't work (even for the MSVC libraries), and MS can't/won't tell, I'm actually somewhat leaning towards going with the simpler and robuster solution. Worst case, if someone notices an issue with it, we can probably (begrudgingly) switch at that point. (The problem unfortunately is that if there is an issue in this area, debugging anything of it is really nontrivial in most cases.) |
|
I noticed one more problem with _tls_start and _tls_end symbols. Those really need to be merged, there may be only one real start and end. This also explains the merging behavior I mentioned earlier: for those we really want to make sure that the unused copy is not emitted. With that logic in place, _tls_used and _tls_index may be just more of the same (just two more lines with this implementation), so I guess simplicity may be an argument for that... I would suggest starting with this PR, because we need it for _tls_start and _tls_end anyway, and follow-up with the robuster version. |
I think I understand, maybe. But let's try to spell it out to see if I'm getting it right. So the reason is that the generated code uses the section relative offset of variables, within So theoretically, instead of using section relative offset of the variables in So if the
Yeah with this explanation I think I understand why we need to do it this way. (Or the alternative way, of treating the two views entirely separately, would require treating the two views |
|
I could have been more specific, sorry, but you got it right. Relocations for I think that having separate TLS directories is still an improvement, but that's only about I will update the description. |
…hen available On ARM64X targets, CRT provides separate TLS directory chunks, expecting the linker to sort it out. TLS directory uses _tls_start and _tls_end symbols to reference .tls section. Those symbols use section sorting to ensure that they are emitted at the start and end of .tls section, but that's not enough when we have two separate chunks for views: only one of them can really be the first one. Following MSVC, merge those chunks instead so that both symbol tables point to the same chunk. Additionally apply the same logic to _tls_used and _tls_index. This allows entire TLS directory to be shared between EC and native views. To achieve that, CRT additionally needs to mark each TLS callback with -arm64xsameaddress. This matches how MSVC linker and libraries work, but it requires EC and native views to use the same set of TLS callbacks. We may emit separate TLS directories in the future to make it more robust.
|
This is a very long thread and I just came back from vacation so, for now, I'll merely reply to the side-comment that I was quoted on.
This means that, even in a case where a Classic process does |
|
Thanks. Here, I meant specifically about the same set of TLS callbacks being pulled by the linker. See the attached test.exe will crash when ran in EC mode. I think that, since EC doesn't use TLS callbacks, If I remove entirely TLS usage from EC (remove tl variable from the test), then no TLS directory is emitted, even through it's required by Classic, so then it crashes when ran in native mode. |
mstorsjo
left a comment
There was a problem hiding this comment.
Thanks - I think this LGTM now. Thanks for taking the time to figure it out properly! Fragile or not, this is what MS link.exe does, so this is a great first step.
Thank you. I'll take a look as soon as I can - I'll aim for late next week. |
|
Thanks! I merged and created #213529 for a possible solution for discussed problems. |
|
/cherry-pick e096d2f |
|
/pull-request #213533 |
| SectionChunk *assocChildren = nullptr; | ||
|
|
||
| // Used for ICF (Identical COMDAT Folding) | ||
| void replace(SectionChunk *other); |
There was a problem hiding this comment.
A small retrospective comment here: The comment above (about these being used for ICF) now only refers to one out of two members relating to this. I'm not sure if this is worth trying to fix up... (And it doesn't need to go along with the backport.)
…hen available (llvm#212845) On ARM64X targets, CRT provides separate TLS directory chunks, expecting the linker to sort it out. TLS directory uses _tls_start and _tls_end symbols to reference .tls section. Those symbols use section sorting to ensure that they are emitted at the start and end of .tls section, but that's not enough when we have two separate chunks for views: only one of them can really be the first one. Following MSVC, merge those chunks instead so that both symbol tables point to the same chunk. Additionally apply the same logic to _tls_used and _tls_index. This allows entire TLS directory to be shared between EC and native views. To achieve that, CRT additionally needs to mark each TLS callback with -arm64xsameaddress. This matches how MSVC linker and libraries work, but it requires EC and native views to use the same set of TLS callbacks. We may emit separate TLS directories in the future to make it more robust.
…hen available (llvm#212845) On ARM64X targets, CRT provides separate TLS directory chunks, expecting the linker to sort it out. TLS directory uses _tls_start and _tls_end symbols to reference .tls section. Those symbols use section sorting to ensure that they are emitted at the start and end of .tls section, but that's not enough when we have two separate chunks for views: only one of them can really be the first one. Following MSVC, merge those chunks instead so that both symbol tables point to the same chunk. Additionally apply the same logic to _tls_used and _tls_index. This allows entire TLS directory to be shared between EC and native views. To achieve that, CRT additionally needs to mark each TLS callback with -arm64xsameaddress. This matches how MSVC linker and libraries work, but it requires EC and native views to use the same set of TLS callbacks. We may emit separate TLS directories in the future to make it more robust.
…hen available (llvm#212845) On ARM64X targets, CRT provides separate TLS directory chunks, expecting the linker to sort it out. TLS directory uses _tls_start and _tls_end symbols to reference .tls section. Those symbols use section sorting to ensure that they are emitted at the start and end of .tls section, but that's not enough when we have two separate chunks for views: only one of them can really be the first one. Following MSVC, merge those chunks instead so that both symbol tables point to the same chunk. Additionally apply the same logic to _tls_used and _tls_index. This allows entire TLS directory to be shared between EC and native views. To achieve that, CRT additionally needs to mark each TLS callback with -arm64xsameaddress. This matches how MSVC linker and libraries work, but it requires EC and native views to use the same set of TLS callbacks. We may emit separate TLS directories in the future to make it more robust.
…hen available (llvm#212845) On ARM64X targets, CRT provides separate TLS directory chunks, expecting the linker to sort it out. TLS directory uses _tls_start and _tls_end symbols to reference .tls section. Those symbols use section sorting to ensure that they are emitted at the start and end of .tls section, but that's not enough when we have two separate chunks for views: only one of them can really be the first one. Following MSVC, merge those chunks instead so that both symbol tables point to the same chunk. Additionally apply the same logic to _tls_used and _tls_index. This allows entire TLS directory to be shared between EC and native views. To achieve that, CRT additionally needs to mark each TLS callback with -arm64xsameaddress. This matches how MSVC linker and libraries work, but it requires EC and native views to use the same set of TLS callbacks. We may emit separate TLS directories in the future to make it more robust. (cherry picked from commit e096d2f)
…hen available (llvm#212845) On ARM64X targets, CRT provides separate TLS directory chunks, expecting the linker to sort it out. TLS directory uses _tls_start and _tls_end symbols to reference .tls section. Those symbols use section sorting to ensure that they are emitted at the start and end of .tls section, but that's not enough when we have two separate chunks for views: only one of them can really be the first one. Following MSVC, merge those chunks instead so that both symbol tables point to the same chunk. Additionally apply the same logic to _tls_used and _tls_index. This allows entire TLS directory to be shared between EC and native views. To achieve that, CRT additionally needs to mark each TLS callback with -arm64xsameaddress. This matches how MSVC linker and libraries work, but it requires EC and native views to use the same set of TLS callbacks. We may emit separate TLS directories in the future to make it more robust.
Following up on this, a DevComm tickets has been filed for the second issue: https://developercommunity.visualstudio.com/t/ARM64X-linker-omits-tls-section-when-on/11140662? |
On ARM64X targets, CRT provides separate TLS directory chunks, expecting the linker to sort it out. TLS directory uses _tls_start and _tls_end symbols to reference .tls section. Those symbols use section sorting to ensure that they are emitted
at the start and end of .tls section, but that's not enough when we have two separate chunks for views: only one of them can really be the first one. Following MSVC, merge those chunks instead so that both symbol tables point to the same chunk.
Additionally apply the same logic to _tls_used and _tls_index. This allows entire TLS directory to be shared between EC and native views. To achieve that, CRT additionally needs to mark each TLS callback with -arm64xsameaddress. This matches how MSVC linker and libraries work, but it requires EC and native views to use the same set of TLS callbacks. We may emit separate TLS directories in the future to make it more robust.