aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authoralx32 <103613512+alx32@users.noreply.github.com>2024-03-27 17:27:51 -0700
committerGitHub <noreply@github.com>2024-03-27 17:27:51 -0700
commitbbfa50696e43f337f55f8bacf739683b181debd5 (patch)
tree3c5adab8bd050abb569ddd0faebebf780d5e2bef /clang/lib/CodeGen/CodeGenModule.cpp
parent0fda758f26c1ec06809fdc067cd65dc146f867d0 (diff)
downloadllvm-bbfa50696e43f337f55f8bacf739683b181debd5.zip
llvm-bbfa50696e43f337f55f8bacf739683b181debd5.tar.gz
llvm-bbfa50696e43f337f55f8bacf739683b181debd5.tar.bz2
[lld-macho] Fix bug in makeSyntheticInputSection when -dead_strip flag is specified (#86878)
Previously, `makeSyntheticInputSection` would create a new `ConcatInputSection` without setting `live` explicitly for it. Without `-dead_strip` this would be OK since `live` would default to `true`. However, with `-dead_strip`, `live` would default to false, and it would remain set to `false`. This hasn't resulted in any issues so far since no code paths that exposed this issue were present. However a recent change - ObjC relative method lists (https://github.com/llvm/llvm-project/pull/86231) exposes this issue by creating relocations to the `SyntheticInputSection`. When these relocations are attempted to be written, this ends up with a crash(assert), since the `SyntheticInputSection` they refer to is marked as dead (`live` = `false`). With this change, we set the correct behavior - `live` will always be `true`. We add a test case that before this change would trigger an assert in the linker.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions