From 9d9a66373156fc59ce8b3ab7bf6ce8ddd349695e Mon Sep 17 00:00:00 2001 From: James Henderson Date: Fri, 7 Apr 2017 10:36:42 +0000 Subject: [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 --- lld/ELF/LinkerScript.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lld/ELF/LinkerScript.cpp') diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 7776889eaab..cd6093e5bc2 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -871,12 +871,12 @@ bool LinkerScript::ignoreInterpSection() { return true; } -uint32_t LinkerScript::getFiller(StringRef Name) { +Optional LinkerScript::getFiller(StringRef Name) { for (BaseCommand *Base : Opt.Commands) if (auto *Cmd = dyn_cast(Base)) if (Cmd->Name == Name) return Cmd->Filler; - return 0; + return None; } static void writeInt(uint8_t *Buf, uint64_t Data, uint64_t Size) { -- cgit v1.2.3