summaryrefslogtreecommitdiff
path: root/binutils/defparse.y
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-03-08 11:50:36 +0000
committerNick Clifton <nickc@redhat.com>2004-03-08 11:50:36 +0000
commitbb239e61e7a971ced95453c5c3edabf0c0d93478 (patch)
tree91c1c3e4dc68032c163bb69d4f8f066936ca7cd4 /binutils/defparse.y
parentfa3d01d21ba4a2507994c9940ca69bbfb8cefb43 (diff)
downloadbinutils-redhat-bb239e61e7a971ced95453c5c3edabf0c0d93478.tar.gz
Honour the PRIVATE keyword
Diffstat (limited to 'binutils/defparse.y')
-rw-r--r--binutils/defparse.y40
1 files changed, 23 insertions, 17 deletions
diff --git a/binutils/defparse.y b/binutils/defparse.y
index d0bccd95a7..b58aaee714 100644
--- a/binutils/defparse.y
+++ b/binutils/defparse.y
@@ -1,22 +1,23 @@
%{ /* defparse.y - parser for .def files */
-/* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright 1995, 1997, 1998, 1999, 2004
+ Free Software Foundation, Inc.
-This file is part of GNU Binutils.
+ This file is part of GNU Binutils.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "bucomm.h"
@@ -30,11 +31,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
%token NAME, LIBRARY, DESCRIPTION, STACKSIZE, HEAPSIZE, CODE, DATA
%token SECTIONS, EXPORTS, IMPORTS, VERSIONK, BASE, CONSTANT
-%token READ WRITE EXECUTE SHARED NONSHARED NONAME
+%token READ WRITE EXECUTE SHARED NONSHARED NONAME PRIVATE
%token SINGLE MULTIPLE INITINSTANCE INITGLOBAL TERMINSTANCE TERMGLOBAL
%token <id> ID
%token <number> NUMBER
-%type <number> opt_base opt_ordinal opt_NONAME opt_CONSTANT opt_DATA
+%type <number> opt_base opt_ordinal opt_NONAME opt_CONSTANT opt_DATA opt_PRIVATE
%type <number> attr attr_list opt_number
%type <id> opt_name opt_equal_name
@@ -66,8 +67,8 @@ explist:
;
expline:
- ID opt_equal_name opt_ordinal opt_NONAME opt_CONSTANT opt_DATA
- { def_exports ($1, $2, $3, $4, $5, $6);}
+ ID opt_equal_name opt_ordinal opt_NONAME opt_CONSTANT opt_DATA opt_PRIVATE
+ { def_exports ($1, $2, $3, $4, $5, $6, $7);}
;
implist:
implist impline
@@ -132,6 +133,11 @@ opt_DATA:
| { $$ = 0; }
;
+opt_PRIVATE:
+ PRIVATE { $$ = 1; }
+ | { $$ = 0; }
+ ;
+
opt_name: ID { $$ =$1; }
| ID '.' ID
{