According to docs, semicolons are mandatory at the end of assignment but they're allowed/optional in directives. I found an example of that in a FreeBSD linker script. I'll change the linker script in FreeBSD to remove the semicolon but I think it's good we support this for GNU ld compatibility.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with a nit.
https://sourceware.org/binutils/docs/ld/Script-Format.html says that "You may separate commands using semicolons", so it seems optional. Probably single ';' at beginning of file is valid because of the same reason that empty statement is accepted in C.
ELF/LinkerScript.cpp | ||
---|---|---|
62–65 ↗ | (On Diff #37277) | if (Tok == ";") continue; if (Tok == "ENTRY") { |