[all-commits] [llvm/llvm-project] 624ea3: [lld/MachO] Fix assert on unsorted data-in-code en...
Nico Weber via All-commits
all-commits at lists.llvm.org
Fri Feb 16 04:47:09 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 624ea349d7fa3535760a21a05c9998c7978228a4
https://github.com/llvm/llvm-project/commit/624ea349d7fa3535760a21a05c9998c7978228a4
Author: Nico Weber <thakis at chromium.org>
Date: 2024-02-16 (Fri, 16 Feb 2024)
Changed paths:
M lld/MachO/SyntheticSections.cpp
M lld/test/MachO/data-in-code.s
Log Message:
-----------
[lld/MachO] Fix assert on unsorted data-in-code entries (#81758)
When the data-in-code entries are in separate sections, they are not
guaranteed to be sorted. In particular, 68b1cc36f3df marked some libc++
string functions as noinline, which leads to global ctors involving
strings now producing data-in-code sections in __TEXT,__StaticInit,
which is why this now happens in practice.
Since data-in-code entries are relatively rare and small, just sort
them. No observed performance impact.
See also crbug.com/41487860
More information about the All-commits
mailing list