]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/ldgram.y
2.41 Release sources
[thirdparty/binutils-gdb.git] / ld / ldgram.y
index 26e56fe15660088c5d9e2bd52d0c1f973684ec76..081176ba0f133658e4dec7c9e7b6a76bba0e90b3 100644 (file)
@@ -125,8 +125,8 @@ static int error_index;
 %right UNARY
 %token END
 %left <token> '('
-%token <token> ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE ASCII ASCIZ
-%token SECTIONS PHDRS INSERT_K AFTER BEFORE
+%token <token> ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE ASCIZ
+%token SECTIONS PHDRS INSERT_K AFTER BEFORE LINKER_VERSION
 %token DATA_SEGMENT_ALIGN DATA_SEGMENT_RELRO_END DATA_SEGMENT_END
 %token SORT_BY_NAME SORT_BY_ALIGNMENT SORT_NONE
 %token SORT_BY_INIT_PRIORITY
@@ -668,23 +668,18 @@ statement:
                {
                  lang_add_data ((int) $1, $3);
                }
-        | ASCII '(' mustbe_exp ')' NAME
-               {
-                 /* 'value' is a memory leak, do we care?  */
-                 etree_type *value = $3;
-                 if (value->type.node_code == INT)
-                   lang_add_string (value->value.value, $5);
-                 else
-                   einfo (_("%X%P:%pS: ASCII expression must be an integer\n"), NULL);
-               }
        | ASCIZ NAME
                {
-                 lang_add_string (0, $2);
+                 lang_add_string ($2);
                }
        | FILL '(' fill_exp ')'
                {
                  lang_add_fill ($3);
                }
+       | LINKER_VERSION
+               {
+                 lang_add_version_string ();
+               }
        | ASSERT_K
                { ldlex_expression (); }
          '(' exp ',' NAME ')' separator
@@ -725,7 +720,7 @@ length:
 fill_exp:
        mustbe_exp
                {
-                 $$ = exp_get_fill ($1, 0, "fill value");
+                 $$ = exp_get_fill ($1, 0, _("fill value"));
                }
        ;
 
@@ -1517,7 +1512,7 @@ yyerror(arg)
     einfo (_("%P:%s: file format not recognized; treating as linker script\n"),
           ldlex_filename ());
   if (error_index > 0 && error_index < ERROR_NAME_MAX)
-    einfo ("%F%P:%pS: %s in %s\n", NULL, arg, error_names[error_index - 1]);
+    einfo (_("%F%P:%pS: %s in %s\n"), NULL, arg, error_names[error_index - 1]);
   else
     einfo ("%F%P:%pS: %s\n", NULL, arg);
 }