diff --git a/lld/ELF/Arch/ARM.cpp b/lld/ELF/Arch/ARM.cpp --- a/lld/ELF/Arch/ARM.cpp +++ b/lld/ELF/Arch/ARM.cpp @@ -60,7 +60,7 @@ GotPltEntrySize = 4; PltEntrySize = 16; PltHeaderSize = 32; - TrapInstr = {0xd4, 0xd4, 0xd4, 0xd4}; + TrapInstr = {{0xd4, 0xd4, 0xd4, 0xd4}}; NeedsThunks = true; } diff --git a/lld/ELF/Arch/MSP430.cpp b/lld/ELF/Arch/MSP430.cpp --- a/lld/ELF/Arch/MSP430.cpp +++ b/lld/ELF/Arch/MSP430.cpp @@ -41,7 +41,7 @@ MSP430::MSP430() { // mov.b #0, r3 - TrapInstr = {0x43, 0x43, 0x43, 0x43}; + TrapInstr = {{0x43, 0x43, 0x43, 0x43}}; } RelExpr MSP430::getRelExpr(RelType Type, const Symbol &S, diff --git a/lld/ELF/Arch/X86.cpp b/lld/ELF/Arch/X86.cpp --- a/lld/ELF/Arch/X86.cpp +++ b/lld/ELF/Arch/X86.cpp @@ -59,7 +59,7 @@ GotPltEntrySize = 4; PltEntrySize = 16; PltHeaderSize = 16; - TrapInstr = {0xcc, 0xcc, 0xcc, 0xcc}; // 0xcc = INT3 + TrapInstr = {{0xcc, 0xcc, 0xcc, 0xcc}}; // 0xcc = INT3 // Align to the non-PAE large page size (known as a superpage or huge page). // FreeBSD automatically promotes large, superpage-aligned allocations. diff --git a/lld/ELF/Arch/X86_64.cpp b/lld/ELF/Arch/X86_64.cpp --- a/lld/ELF/Arch/X86_64.cpp +++ b/lld/ELF/Arch/X86_64.cpp @@ -62,7 +62,7 @@ GotPltEntrySize = 8; PltEntrySize = 16; PltHeaderSize = 16; - TrapInstr = {0xcc, 0xcc, 0xcc, 0xcc}; // 0xcc = INT3 + TrapInstr = {{0xcc, 0xcc, 0xcc, 0xcc}}; // 0xcc = INT3 // Align to the large page size (known as a superpage or huge page). // FreeBSD automatically promotes large, superpage-aligned allocations. diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -409,7 +409,7 @@ return *Filler; if (Flags & SHF_EXECINSTR) return Target->TrapInstr; - return {0, 0, 0, 0}; + return {{0, 0, 0, 0}}; } template void OutputSection::writeHeaderTo(ELF32LE::Shdr *Shdr);