forked from OSchip/llvm-project
8544b40b6e
Prior to this change build with `-shared/-pie` and using TLS (but without -shared-memory) would hit this assert: "Currenly only a single data segment is supported in PIC mode" This is because we were not including TLS data when merging data segments. However, when we build without shared-memory (i.e. without threads) we effectively lower away TLS into a normal active data segment.. so we were ending up with two active data segments: the merged data, and the lowered TLS data. To fix this problem we can instead avoid combining data segments at all when running in shared memory mode (because in this case all segment initialization is passive). And then in non-shared memory mode we know that TLS has been lowered and therefore we can can and should combine all segments. So with this new behavior we have two different modes: 1. With shared memory / mutli-threaded: Never combine data segments since it is not necessary. (All data segments as passive already). 2. Wihout shared memory / single-threaded: Combine *all* data segments since we treat TLS as normal data. (We end up with a single active data segment). Differential Revision: https://reviews.llvm.org/D102937 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Config.h | ||
Driver.cpp | ||
InputChunks.cpp | ||
InputChunks.h | ||
InputElement.h | ||
InputFiles.cpp | ||
InputFiles.h | ||
LTO.cpp | ||
LTO.h | ||
MapFile.cpp | ||
MapFile.h | ||
MarkLive.cpp | ||
MarkLive.h | ||
Options.td | ||
OutputSections.cpp | ||
OutputSections.h | ||
OutputSegment.cpp | ||
OutputSegment.h | ||
Relocations.cpp | ||
Relocations.h | ||
SymbolTable.cpp | ||
SymbolTable.h | ||
Symbols.cpp | ||
Symbols.h | ||
SyntheticSections.cpp | ||
SyntheticSections.h | ||
Writer.cpp | ||
Writer.h | ||
WriterUtils.cpp | ||
WriterUtils.h |