summaryrefslogtreecommitdiff
path: root/ld/ldlex.l
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-05-19 14:01:14 +0000
committerJakub Jelinek <jakub@redhat.com>2004-05-19 14:01:14 +0000
commitd5d8cfb7aae27a953ef33d038288b3220f8bc16d (patch)
tree559e699cf524be4b30c32e7f57a31966f73f40d5 /ld/ldlex.l
parent09ef96522387e032e6c74e81d55330fda85fb8c8 (diff)
downloadbinutils-redhat-d5d8cfb7aae27a953ef33d038288b3220f8bc16d.tar.gz
* ldgram.y (sect_constraint): New.
(ONLY_IF_RO, ONLY_IF_RW): New tokens. (section): Add sect_constraint. Pass additional argument to lang_enter_output_section_statement. * mri.c (mri_draw_tree): Pass additional argument to lang_enter_output_section_statement. * emultempl/pe.em (place_orphan): Likewise. (output_prev_sec_find): Disregard output section statements with constraint == -1. * emultempl/mmo.em (output_prev_sec_find): Likewise. (mmo_place_orphan): Pass additional argument to lang_enter_output_section_statement. * emultempl/elf32.em (output_prev_sec_find): Disregard output section statements with constraint == -1. (place_orphan): Pass additional argument to lang_enter_output_section_statement. * ldlang.c (lang_enter_overlay_section): Likewise. (lang_output_section_find_1): New. (lang_output_section_find): Use it. (lang_output_section_statement_lookup_1): New. (lang_output_section_statement_lookup): Use it. (check_section_callback, check_input_sections): New. (map_input_to_output_sections): Check if all input sections are readonly if ONLY_IF_RO or ONLY_IF_RW was seen. (strip_excluded_output_sections): Disregard output section statements with constraint == -1. (lang_record_phdrs): Likewise. (lang_enter_output_section_statement): Add constraint argument. Use lang_output_section_statement_lookup_1. * ldlang.h (lang_output_section_statement_type): Add constraint and all_input_readonly fields. (lang_enter_output_section_statement): Adjust prototype. * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens. * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text segment if all input sections are readonly.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r--ld/ldlex.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/ld/ldlex.l b/ld/ldlex.l
index 95455314bf..c0a85217bc 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -295,6 +295,8 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<EXPRESSION,BOTH,SCRIPT>"COPY" { RTOKEN(COPY);}
<EXPRESSION,BOTH,SCRIPT>"INFO" { RTOKEN(INFO);}
<EXPRESSION,BOTH,SCRIPT>"OVERLAY" { RTOKEN(OVERLAY);}
+<EXPRESSION,BOTH,SCRIPT>"ONLY_IF_RO" { RTOKEN(ONLY_IF_RO); }
+<EXPRESSION,BOTH,SCRIPT>"ONLY_IF_RW" { RTOKEN(ONLY_IF_RW); }
<BOTH,SCRIPT>"o" { RTOKEN(ORIGIN);}
<BOTH,SCRIPT>"org" { RTOKEN(ORIGIN);}
<BOTH,SCRIPT>"l" { RTOKEN( LENGTH);}