* ld-scripts/crossref.exp: Allow foo to have a leading dot.
[deliverable/binutils-gdb.git] / ld / ldgram.y
index f9c6058feaadcd7eb9ae56df49074f68c9c691c9..f1924a0069efd8e1269da615b42773685397a24f 100644 (file)
@@ -50,7 +50,7 @@ static enum section_type sectype;
 lang_memory_region_type *region;
 
 boolean ldgram_want_filename = true;
-FILE *  saved_script_handle = false;
+FILE *  saved_script_handle = NULL;
 boolean force_make_executable = false;
 
 boolean ldgram_in_script = false;
@@ -125,6 +125,7 @@ static int error_index;
 %token SECTIONS PHDRS SORT
 %token '{' '}'
 %token SIZEOF_HEADERS OUTPUT_FORMAT FORCE_COMMON_ALLOCATION OUTPUT_ARCH
+%token INHIBIT_COMMON_ALLOCATION
 %token SIZEOF_HEADERS
 %token INCLUDE
 %token MEMORY DEFSYMEND
@@ -237,7 +238,9 @@ mri_script_command:
        |       CASE casesymlist
        |       EXTERN extern_name_list
        |       INCLUDE filename
-               { ldfile_open_command_file ($2); } mri_script_lines END
+               { ldlex_script (); ldfile_open_command_file($2); }
+               mri_script_lines END
+               { ldlex_popstate (); }
        |       START NAME
                { lang_add_entry ($2, false); }
         |
@@ -321,6 +324,8 @@ ifile_p1:
                  { ldfile_set_output_arch($3); }
        |       FORCE_COMMON_ALLOCATION
                { command_line.force_common_definition = true ; }
+       |       INHIBIT_COMMON_ALLOCATION
+               { command_line.inhibit_common_definition = true ; }
        |       INPUT '(' input_list ')'
        |       GROUP
                  { lang_enter_group (); }
@@ -329,7 +334,9 @@ ifile_p1:
        |       MAP '(' filename ')'
                { lang_add_map($3); }
        |       INCLUDE filename 
-               { ldfile_open_command_file($2); } ifile_list END
+               { ldlex_script (); ldfile_open_command_file($2); }
+               ifile_list END
+               { ldlex_popstate (); }
        |       NOCROSSREFS '(' nocrossref_list ')'
                {
                  lang_add_nocrossref ($3);
@@ -1054,7 +1061,11 @@ vers_nodes:
        ;
 
 vers_node:
-               VERS_TAG '{' vers_tag '}' ';'
+               '{' vers_tag '}' ';'
+               {
+                 lang_register_vers_node (NULL, $2, NULL);
+               }
+       |       VERS_TAG '{' vers_tag '}' ';'
                {
                  lang_register_vers_node ($1, $3, NULL);
                }
This page took 0.023666 seconds and 4 git commands to generate.