Skip to content

Commit 144b93f

Browse files
committed
Address review feedback in Writer.cpp
1 parent aae4833 commit 144b93f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lld/ELF/Writer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,8 +2181,7 @@ template <class ELFT> void Writer<ELFT>::checkExecuteOnly() {
21812181
// Check which input sections of RX output sections don't have the
21822182
// SHF_AARCH64_PURECODE or SHF_ARM_PURECODE flag set.
21832183
template <class ELFT> void Writer<ELFT>::checkExecuteOnlyReport() {
2184-
if ((ctx.arg.emachine != EM_AARCH64 && ctx.arg.emachine != EM_ARM) ||
2185-
ctx.arg.zExecuteOnlyReport == "none")
2184+
if (ctx.arg.zExecuteOnlyReport == "none")
21862185
return;
21872186

21882187
auto reportUnless = [&](bool cond) -> ELFSyncStream {
@@ -2204,7 +2203,7 @@ template <class ELFT> void Writer<ELFT>::checkExecuteOnlyReport() {
22042203
for (OutputSection *osec : ctx.outputSections)
22052204
if (osec->getPhdrFlags() == (PF_R | PF_X))
22062205
for (InputSection *sec : getInputSections(*osec, storage))
2207-
if (sec->file && sec->file->getName() != "<internal>")
2206+
if (!isa<SyntheticSection>(sec))
22082207
reportUnless(sec->flags & purecodeFlag)
22092208
<< "-z execute-only-report: " << sec << " does not have "
22102209
<< purecodeFlagName << " flag set";

0 commit comments

Comments
 (0)