aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlex.l
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2021-07-21 14:32:03 +0100
committerNick Clifton <nickc@redhat.com>2021-07-21 14:36:02 +0100
commit6b86da53d5ee2022b9065f445d23356190380746 (patch)
tree30672413b66483f04b1d54399cae642ae651eccc /ld/ldlex.l
parent8f5d31b8d1f80fd9fff4cef4acc4491a0d83fbed (diff)
downloadgdb-6b86da53d5ee2022b9065f445d23356190380746.zip
gdb-6b86da53d5ee2022b9065f445d23356190380746.tar.gz
gdb-6b86da53d5ee2022b9065f445d23356190380746.tar.bz2
Allows linker scripts to set the SEC_READONLY flag.
* ld.texi: Document new output section type. * ldgram.y: Add new token. * ldlang.c: Handle the new flag. * ldlang.h: Add readonly_section to list of section types. * ldlex.l: Add a new identifier. * testsuite/ld-scripts/output-section-types.t: New example linker script. * testsuite/ld-scripts/output-section-types.d: Test driver. * testsyute/ld-scripts/script.exp: Run the new test.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r--ld/ldlex.l1
1 files changed, 1 insertions, 0 deletions
diff --git a/ld/ldlex.l b/ld/ldlex.l
index c1b1526..25b4bca 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -294,6 +294,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<BOTH,SCRIPT>"SORT_BY_INIT_PRIORITY" { RTOKEN(SORT_BY_INIT_PRIORITY); }
<BOTH,SCRIPT>"SORT_NONE" { RTOKEN(SORT_NONE); }
<EXPRESSION,BOTH,SCRIPT>"NOLOAD" { RTOKEN(NOLOAD);}
+<EXPRESSION,BOTH,SCRIPT>"READONLY" { RTOKEN(READONLY);}
<EXPRESSION,BOTH,SCRIPT>"DSECT" { RTOKEN(DSECT);}
<EXPRESSION,BOTH,SCRIPT>"COPY" { RTOKEN(COPY);}
<EXPRESSION,BOTH,SCRIPT>"INFO" { RTOKEN(INFO);}