llvm-project
fc8f54d4 - [LLD][MachO] Option to emit separate cstring sections (#158720)

Commit
106 days ago
[LLD][MachO] Option to emit separate cstring sections (#158720) Add the `--{no-}separate-cstring-literal-sections` option to emit cstring literals into sections defined by their section name. This allows for changes like https://github.com/swiftlang/swift/pull/84300 and https://github.com/swiftlang/swift/pull/84236 to actually have an affect. The default behavior has not changed. The reason this is useful is because strings in different sections might have different access patterns at runtime. By splitting these strings into separate sections, we may reduce the number of page faults during startup. For example, the ObjC runtime accesses all strings in `__objc_classname` before main.
Author
Parents
Loading