]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
ld script fill pattern expression
authorAlan Modra <amodra@gmail.com>
Sat, 14 Aug 2021 00:02:35 +0000 (09:32 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 14 Aug 2021 00:24:48 +0000 (09:54 +0930)
commit4ffb22ec4040030ea36829c74076f35b3ca0872a
tree16484472ec9b5cdaf746debdd2f62cb499f94406
parent96ddc891f296b9a5f4a2e6788adb38d93b1e14ca
ld script fill pattern expression

It turns out we do need to backtrack when parsing after all.  The
fill_opt component in the section rule swiches to EXPRESSION and back
to SCRIPT, and to find the end of an expression it is necessary to
look ahead one token.

* ldgram.y (section): Throw away lookahead NAME token.
(overlay_section): Likewise.
* testsuite/ld-elf/overlay.t: Add fill pattern on overlays.
Test fill pattern before stupidly named normal sections too,
and before /DISCARD/.
ld/ldgram.y
ld/testsuite/ld-elf/overlay.t