Support character escapes in linkerscript strings

This allows linkerscripts to refer to section names even if
they contain special characters: '\r' '\n' '\t' '"' '\\'.
This commit is contained in:
Rangi
2021-04-26 11:40:58 -04:00
committed by Rangi
parent d17e9c663e
commit e27a6d53a0
4 changed files with 27 additions and 3 deletions

View File

@@ -0,0 +1,3 @@
ROM0
"A\"B\tC\rD\nE"
"in\{valid"

View File

@@ -0,0 +1 @@
error: ./linkerscript-escapes-test.link(3): Illegal character escape

View File

@@ -0,0 +1,4 @@
SECTION "A\"B\tC\rD\nE", ROM0
DS $1000
SECTION "in\{valid", ROM0
DS $1000