[GOLD Patch] Grammar additions to handle INCLUDE directives

Ian Lance Taylor iant@google.com
Fri Nov 11 21:24:00 GMT 2011
Sterling Augustine <saugustine@google.com> writes:

> 2011-11-11  Sterling Augustine  <saugustine@google.com>
>
> 	* yyscript.y (section_cmd): Add support for INCLUDE directive.
> 	(file_or_sections_cmd): Likewise.
>
> Index: yyscript.y
> ===================================================================
> RCS file: /cvs/src/src/gold/yyscript.y,v
> retrieving revision 1.26
> diff -u -r1.26 yyscript.y
> --- yyscript.y	8 Sep 2010 16:10:31 -0000	1.26
> +++ yyscript.y	11 Nov 2011 20:06:21 -0000
> @@ -528,6 +528,8 @@
>  		 nothing, we accept it and ignore it.  */
>  	    }
>  	| SORT_BY_NAME '(' CONSTRUCTORS ')'
> +	| INCLUDE string
> +	  { script_include_directive(closure, $2.value, $2.length); }
>  	| ';'
>  	;
>  
> @@ -689,6 +691,8 @@
>  	| assignment end
>  	| ASSERT_K '(' parse_exp ',' string ')'
>  	    { script_add_assertion(closure, $3, $5.value, $5.length); }
> +	| INCLUDE string
> +	  { script_include_directive(closure, $2.value, $2.length); }
>  	;
>  
>  /* A list of MEMORY definitions.  */


The indentation looks wrong.  The left brace should be under the 'C', or
in other words it should line up under the other left braces in the
file.  (It's wrong in the other call to script_include_directive also).

This is OK if you fix that, or if it is already correct and just munged
by diff or mail.

Thanks.

Ian



More information about the Binutils mailing list