diff options
author | Steve Chamberlain <sac@cygnus> | 1992-04-15 23:11:09 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1992-04-15 23:11:09 +0000 |
commit | 2e38b71d27d48f7a1698560a71decb528422174c (patch) | |
tree | a0fdb76b896ab62af0655e78238a2c5585dc251b /ld/ldgram.y | |
parent | 3d2b83ea49dc76204b0b068a56d8c9c37075b0d5 (diff) | |
download | gdb-2e38b71d27d48f7a1698560a71decb528422174c.zip gdb-2e38b71d27d48f7a1698560a71decb528422174c.tar.gz gdb-2e38b71d27d48f7a1698560a71decb528422174c.tar.bz2 |
Strange link script support
Diffstat (limited to 'ld/ldgram.y')
-rw-r--r-- | ld/ldgram.y | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y index d6a4830..9c882f7 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -126,7 +126,7 @@ struct sec *section; /*%token <token> '+' '-' '*' '/' '%'*/ %right UNARY -%token END +%token END %left <token> '(' %token <token> ALIGN_K BLOCK LONG SHORT BYTE %token SECTIONS @@ -152,7 +152,7 @@ struct sec *section; %type <name> filename -%token CHIP LIST SECT ABSOLUTE LOAD +%token CHIP LIST SECT ABSOLUTE LOAD NEWLINE ENDWORD ORDER NAMEWORD FORMAT %{ ld_config_type config; @@ -345,22 +345,25 @@ mri_script_file: ; mri_script_lines: - mri_script_lines mri_script_line - | + mri_script_lines mri_script_command NEWLINE + | ; -mri_script_line: +mri_script_command: CHIP exp | CHIP exp ',' exp | NAME { - einfo("%P%F: unrecognised keyword in MRI style script '%s'\n", - $1); + einfo("%P%F: unrecognised keyword in MRI style script '%s'\n",$1); } | LIST { write_map = true; config.map_filename = "-"; } - | SECT NAME ',' exp + | ORDER ordernamelist + | ENDWORD + | FORMAT NAME + { mri_format($2); } + | SECT NAME ',' exp { mri_output_section($2, $4);} | SECT NAME exp { mri_output_section($2, $3);} @@ -368,6 +371,15 @@ mri_script_line: { mri_output_section($2, $4);} | ABSOLUTE mri_abs_name_list | LOAD mri_load_name_list + | NAMEWORD NAME + { mri_name($2); } + | + ; + +ordernamelist: + ordernamelist ',' NAME { mri_order($3); } + | ordernamelist NAME { mri_order($2); } + | ; mri_load_name_list: |