[lld] r337340 - Workaround warning bug in old versions of gcc.
Sterling Augustine via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 17 17:33:25 PDT 2018
Author: saugustine
Date: Tue Jul 17 17:33:25 2018
New Revision: 337340
URL: http://llvm.org/viewvc/llvm-project?rev=337340&view=rev
Log:
Workaround warning bug in old versions of gcc.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
Modified:
lld/trunk/ELF/Arch/X86_64.cpp
Modified: lld/trunk/ELF/Arch/X86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/X86_64.cpp?rev=337340&r1=337339&r2=337340&view=diff
==============================================================================
--- lld/trunk/ELF/Arch/X86_64.cpp (original)
+++ lld/trunk/ELF/Arch/X86_64.cpp Tue Jul 17 17:33:25 2018
@@ -471,6 +471,10 @@ void X86_64<ELFT>::relaxGot(uint8_t *Loc
write32le(Loc - 1, Val + 1);
}
+// This anonymous namespace works around a warning bug in
+// old versions of gcc. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
+namespace {
+
// A split-stack prologue starts by checking the amount of stack remaining
// in one of two ways:
// A) Comparing of the stack pointer to a field in the tcb.
@@ -505,6 +509,8 @@ bool X86_64<ELF32LE>::adjustPrologueForC
llvm_unreachable("Target doesn't support split stacks.");
}
+} // namespace
+
// These nonstandard PLT entries are to migtigate Spectre v2 security
// vulnerability. In order to mitigate Spectre v2, we want to avoid indirect
// branch instructions such as `jmp *GOTPLT(%rip)`. So, in the following PLT
More information about the llvm-commits
mailing list