[ELF] Recommit r299635 to pad x86 executable sections with 0xcc
This follows r299748 which fixed a latent bug the original commit exposed.
llvm-svn: 299755
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 7776889e..cd6093e 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -871,12 +871,12 @@
return true;
}
-uint32_t LinkerScript::getFiller(StringRef Name) {
+Optional<uint32_t> LinkerScript::getFiller(StringRef Name) {
for (BaseCommand *Base : Opt.Commands)
if (auto *Cmd = dyn_cast<OutputSectionCommand>(Base))
if (Cmd->Name == Name)
return Cmd->Filler;
- return 0;
+ return None;
}
static void writeInt(uint8_t *Buf, uint64_t Data, uint64_t Size) {