[gold] Implement HIDDEN syntax in linker scripts
authorRoland McGrath <mcgrathr@google.com>
Fri, 12 Aug 2016 16:50:49 +0000 (09:50 -0700)
committerRoland McGrath <mcgrathr@google.com>
Fri, 12 Aug 2016 16:50:49 +0000 (09:50 -0700)
gold/
* yyscript.y (HIDDEN): New %token.
(assignment): Handle HIDDEN(string = expr) syntax.
* script.cc (script_keyword_parsecodes): Add HIDDEN.

gold/ChangeLog
gold/script.cc
gold/yyscript.y

index 687e56e2821c375f6d9fbc423e743eece28aebe0..a1561630275e453b0f484fe48b879adb02930214 100644 (file)
@@ -1,3 +1,9 @@
+2016-08-12  Roland McGrath  <roland@hack.frob.com>
+
+       * yyscript.y (HIDDEN): New %token.
+       (assignment): Handle HIDDEN(string = expr) syntax.
+       * script.cc (script_keyword_parsecodes): Add HIDDEN.
+
 2016-08-10  Cary Coutant  <ccoutant@gmail.com>
 
        PR gold/20216
index d6aa7b250a4c6ecc5719d0ec99c6ddec5375eba7..bb8b4372f88a3056845f6294223b1698850f8eaa 100644 (file)
@@ -1755,6 +1755,7 @@ script_keyword_parsecodes[] =
   { "FLOAT", FLOAT },
   { "FORCE_COMMON_ALLOCATION", FORCE_COMMON_ALLOCATION },
   { "GROUP", GROUP },
+  { "HIDDEN", HIDDEN },
   { "HLL", HLL },
   { "INCLUDE", INCLUDE },
   { "INFO", INFO },
@@ -2696,7 +2697,7 @@ script_add_library(void* closurev, const char* name, size_t length)
 
   if (name_string[0] != 'l')
     gold_error(_("library name must be prefixed with -l"));
-    
+
   Input_file_argument file(name_string.c_str() + 1,
                           Input_file_argument::INPUT_FILE_TYPE_LIBRARY,
                           "", false,
index 7e6bd27b4121a471de481fcb1363c46d022e0824..38831d560912eef2a8384a5e754c0593ee05e2cc 100644 (file)
 %token FORCE_COMMON_ALLOCATION
 %token GLOBAL          /* global */
 %token GROUP
+%token HIDDEN
 %token HLL
 %token INCLUDE
 %token INHIBIT_COMMON_ALLOCATION
@@ -864,6 +865,8 @@ assignment:
              Expression_ptr e = script_exp_binary_bitwise_or(s, $3);
              script_set_symbol(closure, $1.value, $1.length, e, 0, 0);
            }
+       | HIDDEN '(' string '=' parse_exp ')'
+           { script_set_symbol(closure, $3.value, $3.length, $5, 0, 1); }
        | PROVIDE '(' string '=' parse_exp ')'
            { script_set_symbol(closure, $3.value, $3.length, $5, 1, 0); }
        | PROVIDE_HIDDEN '(' string '=' parse_exp ')'
This page took 0.026074 seconds and 4 git commands to generate.