summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2017-04-07 10:36:42 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2017-04-07 10:36:42 +0000
commit9d9a66373156fc59ce8b3ab7bf6ce8ddd349695e (patch)
tree02d6a2d66c69d3651e5ef8ebd38b99b6355c30da /lld/ELF/LinkerScript.cpp
parentdb1bdf472aed54d2252071eff67eacb98b63509c (diff)
downloadbcm5719-llvm-9d9a66373156fc59ce8b3ab7bf6ce8ddd349695e.tar.gz
bcm5719-llvm-9d9a66373156fc59ce8b3ab7bf6ce8ddd349695e.zip
[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
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r--lld/ELF/LinkerScript.cpp4
1 files changed, 2 insertions, 2 deletions
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<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) {
OpenPOWER on IntegriCloud