diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-07-21 14:32:03 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-07-21 14:36:02 +0100 |
commit | 6b86da53d5ee2022b9065f445d23356190380746 (patch) | |
tree | 30672413b66483f04b1d54399cae642ae651eccc /ld/ldgram.y | |
parent | 8f5d31b8d1f80fd9fff4cef4acc4491a0d83fbed (diff) | |
download | gdb-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/ldgram.y')
-rw-r--r-- | ld/ldgram.y | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y index dd911f4..31e0071 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -139,6 +139,7 @@ static int error_index; %token REGION_ALIAS %token LD_FEATURE %token NOLOAD DSECT COPY INFO OVERLAY +%token READONLY %token DEFINED TARGET_K SEARCH_DIR MAP ENTRY %token <integer> NEXT %token SIZEOF ALIGNOF ADDR LOADADDR MAX_K MIN_K @@ -1123,6 +1124,7 @@ type: | COPY { sectype = noalloc_section; } | INFO { sectype = noalloc_section; } | OVERLAY { sectype = noalloc_section; } + | READONLY { sectype = readonly_section; } ; atype: |