PR binutils/13710

* defparse.y (keyword_as_name): Disable LIBRARY
	keyword.
	* doc/binutils.texi: Document LIBRARY exception.

	PR binutils/13710
	* deffilep.y (keyword_as_name): Disable LIBRARY
	keyword.
This commit is contained in:
Kai Tietz
2012-02-24 14:20:19 +00:00
parent 11337c2fed
commit 5b3d386eed
5 changed files with 32 additions and 2 deletions
+7
View File
@@ -1,3 +1,10 @@
2012-02-24 Kai Tietz <ktietz@redhat.com>
PR binutils/13710
* defparse.y (keyword_as_name): Disable LIBRARY
keyword.
* doc/binutils.texi: Document LIBRARY exception.
2012-02-21 Kai Tietz<ktietz@redhat.com> 2012-02-21 Kai Tietz<ktietz@redhat.com>
PR binutils/13682 PR binutils/13682
+4 -1
View File
@@ -153,7 +153,10 @@ opt_PRIVATE:
; ;
keyword_as_name: NAME { $$ = "NAME"; } keyword_as_name: NAME { $$ = "NAME"; }
| LIBRARY { $$ = "LIBRARY"; } /* Disabled LIBRARY keyword for a quirk in libtool. It places LIBRARY
command after EXPORTS list, which is illegal by specification.
See PR binutils/13710
| LIBRARY { $$ = "LIBRARY"; } */
| DESCRIPTION { $$ = "DESCRIPTION"; } | DESCRIPTION { $$ = "DESCRIPTION"; }
| STACKSIZE { $$ = "STACKSIZE"; } | STACKSIZE { $$ = "STACKSIZE"; }
| HEAPSIZE { $$ = "HEAPSIZE"; } | HEAPSIZE { $$ = "HEAPSIZE"; }
+9
View File
@@ -3987,6 +3987,9 @@ The result is going to be named @var{name}@code{.exe}.
@item @code{LIBRARY} @var{name} @code{[ ,} @var{base} @code{]} @item @code{LIBRARY} @var{name} @code{[ ,} @var{base} @code{]}
The result is going to be named @var{name}@code{.dll}. The result is going to be named @var{name}@code{.dll}.
Note: If you want to use LIBRARY as name then you need to quote. Otherwise
this will fail due a necessary hack for libtool (see PR binutils/13710 for more
details).
@item @code{EXPORTS ( ( (} @var{name1} @code{[ = } @var{name2} @code{] ) | ( } @var{name1} @code{=} @var{module-name} @code{.} @var{external-name} @code{) ) [ == } @var{its_name} @code{]} @item @code{EXPORTS ( ( (} @var{name1} @code{[ = } @var{name2} @code{] ) | ( } @var{name1} @code{=} @var{module-name} @code{.} @var{external-name} @code{) ) [ == } @var{its_name} @code{]}
@item @code{[} @var{integer} @code{] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *} @item @code{[} @var{integer} @code{] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *}
@@ -3995,6 +3998,9 @@ ordinal number @var{integer}, or declares @var{name1} as an alias
(forward) of the function @var{external-name} in the DLL. (forward) of the function @var{external-name} in the DLL.
If @var{its_name} is specified, this name is used as string in export table. If @var{its_name} is specified, this name is used as string in export table.
@var{module-name}. @var{module-name}.
Note: The @code{EXPORTS} has to be the last command in .def file, as keywords
are treated - beside @code{LIBRARY} - as simple name-identifiers.
If you want to use LIBRARY as name then you need to quote it.
@item @code{IMPORTS ( (} @var{internal-name} @code{=} @var{module-name} @code{.} @var{integer} @code{) | [} @var{internal-name} @code{= ]} @var{module-name} @code{.} @var{external-name} @code{) [ == ) @var{its_name} @code{]} *} @item @code{IMPORTS ( (} @var{internal-name} @code{=} @var{module-name} @code{.} @var{integer} @code{) | [} @var{internal-name} @code{= ]} @var{module-name} @code{.} @var{external-name} @code{) [ == ) @var{its_name} @code{]} *}
Declares that @var{external-name} or the exported function whose Declares that @var{external-name} or the exported function whose
@@ -4003,6 +4009,9 @@ ordinal number is @var{integer} is to be imported from the file
the name that the imported function will be referred to in the body of the name that the imported function will be referred to in the body of
the DLL. the DLL.
If @var{its_name} is specified, this name is used as string in import table. If @var{its_name} is specified, this name is used as string in import table.
Note: The @code{IMPORTS} has to be the last command in .def file, as keywords
are treated - beside @code{LIBRARY} - as simple name-identifiers.
If you want to use LIBRARY as name then you need to quote it.
@item @code{DESCRIPTION} @var{string} @item @code{DESCRIPTION} @var{string}
Puts @var{string} into the output @file{.exp} file in the Puts @var{string} into the output @file{.exp} file in the
+6
View File
@@ -1,3 +1,9 @@
2012-02-24 Kai Tietz <ktietz@redhat.com>
PR binutils/13710
* deffilep.y (keyword_as_name): Disable LIBRARY
keyword.
2012-02-22 Alan Modra <amodra@gmail.com> 2012-02-22 Alan Modra <amodra@gmail.com>
PR ld/13683 PR ld/13683
+6 -1
View File
@@ -249,7 +249,12 @@ keyword_as_name: BASE { $$ = "BASE"; }
| EXPORTS { $$ = "EXPORTS"; } | EXPORTS { $$ = "EXPORTS"; }
| HEAPSIZE { $$ = "HEAPSIZE"; } | HEAPSIZE { $$ = "HEAPSIZE"; }
| IMPORTS { $$ = "IMPORTS"; } | IMPORTS { $$ = "IMPORTS"; }
| LIBRARY { $$ = "LIBRARY"; } /* Disable LIBRARY keyword as valid symbol-name. This is necessary
for libtool, which places this command after EXPORTS command.
This behavior is illegal by specification, but sadly required by
by compatibility reasons.
See PR binutils/13710
| LIBRARY { $$ = "LIBRARY"; } */
| NAME { $$ = "NAME"; } | NAME { $$ = "NAME"; }
| NONAMEU { $$ = "NONAME"; } | NONAMEU { $$ = "NONAME"; }
| NONAMEL { $$ = "noname"; } | NONAMEL { $$ = "noname"; }