================
@@ -1057,7 +1057,15 @@ static StringRef getOutputDataSegmentName(const
InputChunk &seg) {
OutputSegment *Writer::createOutputSegment(StringRef name) {
LLVM_DEBUG(dbgs() << "new segment: " << name << "\n");
OutputSegment *s = make<OutputSegment>(name);
- if (ctx.arg.sharedMemory)
+ // In the shared memory case, all data segments must be passive since they
+ // will be initialized once by the main thread and then shared with other
+ // threads. In the non-shared memory case, we use passive segments only for
+ // TLS segments, so that they can be reused, and for .bss segments, which
+ // don't need to be included in the binary at all.
----------------
TartanLlama wrote:
I've updated the comment
https://github.com/llvm/llvm-project/pull/200855
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits