Skip to content

Commit e689515

Browse files
committed
[ELF] OVERLAY: support quoted output section names
1 parent 74ef53a commit e689515

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lld/ELF/ScriptParser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,8 @@ static Expr checkAlignment(Expr e, std::string &loc) {
954954
}
955955

956956
OutputDesc *ScriptParser::readOverlaySectionDescription() {
957-
OutputDesc *osd = script->createOutputSection(next(), getCurrentLocation());
957+
OutputDesc *osd =
958+
script->createOutputSection(readName(), getCurrentLocation());
958959
osd->osec.inOverlay = true;
959960
expect("{");
960961
while (auto tok = till("}")) {

lld/test/ELF/linkerscript/overlay.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ _start:
5959
SECTIONS {
6060
## LMA defaults to VMA
6161
OVERLAY 0x1000 : {
62-
.big1 { *(.big1) }
62+
".big1" { *(".big1") }
6363
.small1 { *(.small1) }
6464
}
6565
## .big2 starts at ADDR(.small2)
6666
OVERLAY : AT (0x2008) {
6767
.small2 { *(.small2) }
68-
.big2 { *(.big2) }
68+
".big2" { *(.big2) }
6969
}
7070
## .empty3 is not discarded. .small3 and .big3 share its address.
7171
OVERLAY . : AT (0x2014) {

0 commit comments

Comments
 (0)