ld: Don't allow '~' as the first char in symbol name
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 9 Oct 2017 11:17:10 +0000 (04:17 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 9 Oct 2017 11:17:24 +0000 (04:17 -0700)
commit76f361eb4934dcda0626517c311b34fbc92d09b9
treed143cd18021208ec0d2365bf8c3b4134ead314fc
parent5d3b558acd329de9dcbd63d9bb04242b31fad490
ld: Don't allow '~' as the first char in symbol name

Don't allow '~' as the first character in symbol name in linker script.

PR ld/22267
* ldlex.l (SYMBOLNAMECHAR1) New.
(DEFSYMEXP): Replace FILENAMECHAR1 with SYMBOLNAMECHAR1.
(EXPRESSION): Likewise.
* testsuite/ld-scripts/expr.exp: Run pr22267.
* testsuite/ld-scripts/pr22267.d: New file.
* testsuite/ld-scripts/pr22267.s: Likewise.
* testsuite/ld-scripts/pr22267.t: Likewise.
ld/ChangeLog
ld/ldlex.l
ld/testsuite/ld-scripts/expr.exp
ld/testsuite/ld-scripts/pr22267.d [new file with mode: 0644]
ld/testsuite/ld-scripts/pr22267.s [new file with mode: 0644]
ld/testsuite/ld-scripts/pr22267.t [new file with mode: 0644]