| commit | 7185a1acec989d537f9523389516ca233822192b | [log] [tgz] |
|---|---|---|
| author | George Rimar <grimar@accesssoftek.com> | Tue Jan 17 15:32:12 2017 +0000 |
| committer | George Rimar <grimar@accesssoftek.com> | Tue Jan 17 15:32:12 2017 +0000 |
| tree | c02fbbcab95586f879bf6244db7c8aa3a715d204 | |
| parent | 9dffada98bdf2af532c4371ac6ba89262bb8beb8 [diff] [blame] |
[ELF] - Support optional comma after output section command. I found this when tried to link linux kernel with LLD: https://github.com/torvalds/linux/blob/master/arch/x86/entry/vdso/vdso-layout.lds.S#L86 Output section command can have optional comma at the end: .text : { *(.text*) } :text =0x90909090, It was documented about 3 years ago for binutils: https://sourceware.org/ml/binutils/2014-04/msg00045.html Differential revision: https://reviews.llvm.org/D28803 llvm-svn: 292225
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 887ca12..d6d4c74 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp
@@ -1471,6 +1471,9 @@ else if (peek().startswith("=")) Cmd->Filler = readOutputSectionFiller(next().drop_front()); + // Consume optional comma following output section command. + consume(","); + return Cmd; }