Skip to content

Commit 0d8bc10

Browse files
committed
[ELF] Memory region: support quoted names
1 parent e689515 commit 0d8bc10

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lld/ELF/ScriptParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,11 +1040,11 @@ OutputDesc *ScriptParser::readOutputSectionDescription(StringRef outSec) {
10401040
}
10411041

10421042
if (consume(">"))
1043-
osec->memoryRegionName = std::string(next());
1043+
osec->memoryRegionName = std::string(readName());
10441044

10451045
if (consume("AT")) {
10461046
expect(">");
1047-
osec->lmaRegionName = std::string(next());
1047+
osec->lmaRegionName = std::string(readName());
10481048
}
10491049

10501050
if (osec->lmaExpr && !osec->lmaRegionName.empty())

lld/test/ELF/linkerscript/at2.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SECTIONS {
1919
.foo2 : { *(.foo2) } > AX
2020

2121
.bar1 : { *(.bar1) } > AW
22-
.bar2 : { *(.bar2) } > AW AT > RAM
22+
.bar2 : { *(.bar2) } > "AW" AT > "RAM"
2323
.bar3 . : { *(.bar3) } > AW
2424
.bar4 : { *(.bar4) } > AW AT >RAM
2525
}

lld/test/ELF/linkerscript/at3.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ MEMORY {
1313
SECTIONS {
1414
.foo1 : { *(.foo1) } > FOO AT>FLASH
1515
.foo2 : { *(.foo2) BYTE(0x42) } > BAR AT>FLASH
16-
.foo3 : { *(.foo3) } > ZED AT>FLASH
16+
.foo3 : { *(.foo3) } >"ZED" AT>"FLASH"
1717
}
1818

1919
# CHECK: .foo1 PROGBITS 0000000000001000 001000

0 commit comments

Comments
 (0)