From 6b86da53d5ee2022b9065f445d23356190380746 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 21 Jul 2021 14:32:03 +0100 Subject: 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. --- ld/ldlex.l | 1 + 1 file changed, 1 insertion(+) (limited to 'ld/ldlex.l') 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\[\]\-\!\^\\]|::)* "SORT_BY_INIT_PRIORITY" { RTOKEN(SORT_BY_INIT_PRIORITY); } "SORT_NONE" { RTOKEN(SORT_NONE); } "NOLOAD" { RTOKEN(NOLOAD);} +"READONLY" { RTOKEN(READONLY);} "DSECT" { RTOKEN(DSECT);} "COPY" { RTOKEN(COPY);} "INFO" { RTOKEN(INFO);} -- cgit v1.1