<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114111>114111</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
macOS: Why are Objective-C sections marked with `no_dead_strip`?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
madsmtm
</td>
</tr>
</table>
<pre>
Why are the sections used internally by Objective-C marked by Clang with `no_dead_strip`?
For example `__DATA,__objc_classrefs,regular,no_dead_strip` in [here](https://github.com/llvm/llvm-project/blob/7836603062ea9bb519bb68187024a58bb7c2f31b/clang/lib/CodeGen/CGObjCMac.cpp#L7450).
It seems like that might prevent (like the name says) certain forms of dead stripping of Objective-C code? Though I couldn't find an example of this, in practice the linker seems to remove it anyhow?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkstu6zYQhp-G2gyOQY7uCy18bOggQIssGqBLg5RGEhOKFEjKqd--oOOkQRcFuuFlZjCY_59PhqBnS9Sx8icrz5nc4-J8t8oxrHHNlBtv3Z_LDaQniAtBoCFqZwPsgUbQNpK30pgbqBs8q9eUvdKPE6zSv9GYoicj7QzvOi7AKm7dZSQ5XkL0emMVZ3nP-Jnx48fZOw_0l1w3Q6n6cjkfX44MT5eLU6_DZTAyBE9TYHjyNO9Geoanf_cEbYGVPxfyxMozw2aJcQssPzLsGfazjsuuDoNbGfbGXD-vH5t3SQDDXhmnGPZ1k1cVz3mFJFulStEqVTWiqTkWsmyUqgeccpFKh6QyNdLpd3Ij_SKbXr-e1evpdzkchm1jmP9WFyVn2B6-q36KEIjWAEa_JZtlhFXPS4TN05VsBIbNI0Vg5UoQ5C0wbGEgH6W2MDm_BnATJCPgbsSm7Zwi37cyuJFY3sPL4vZ5gScY3G5Gy7COMGk7grRf9rsJ4qKT08nPzcsh6uFjBKPtG_nHzNGBp9VdCXQEaW-Le2d5n41dPrZ5KzPqRJ1zxLJFkS1dNQk1iaJs8la1RBVSVY1lUUuueNVglekOORaCYysa0eT1oZITR5TNKNpykpKzgtMqtTmkpR2cnzMdwk6dEIUQIjNSkQl3nhEtvcM9yxAT3r67b1rtc2AFNzrE8E-bqKOhbpXD8x8sP8In9t8N_ML_wfd_YJ3t3nT_m7z7sIFh_1Bz7fDvAAAA___w8y2k">