forked from OSchip/llvm-project
[ELF, LinkerScript] Memory region name parsing fix
This patch fixes a small issue with respect to how memory region names are parsed on output section descriptions. For example, consider: .text : { *(.text) } > rom That can also be written like: .text : { *(.text) } >rom The latter form is accepted by GNU LD and is fairly common. Differential Revision: https://reviews.llvm.org/D35920 llvm-svn: 309191
This commit is contained in:
parent
cb98c14f89
commit
b0e6229742
|
@ -652,6 +652,8 @@ ScriptParser::readOutputSectionDescription(StringRef OutSec) {
|
|||
|
||||
if (consume(">"))
|
||||
Cmd->MemoryRegionName = next();
|
||||
else if (peek().startswith(">"))
|
||||
Cmd->MemoryRegionName = next().drop_front();
|
||||
|
||||
Cmd->Phdrs = readOutputSectionPhdrs();
|
||||
|
||||
|
|
Loading…
Reference in New Issue