mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-20 09:31:29 +00:00
Wed Jun 14 13:27:22 1995 Steve Chamberlain <sac@slash.cygnus.com>
* deflex.l, defparse.y, dlltool.c: New files. * Makefile.in, configure.in: Support for them. Mon Jun 12 11:27:54 1995 Steve Chamberlain <sac@slash.cygnus.com> * sysdump.c: Include sysdep.h (main): Open input with FOPEN_RB. binutils/7137
This commit is contained in:
parent
a055dacb68
commit
765e60a947
@ -45,6 +45,9 @@ config
|
||||
configure.bat
|
||||
configure.in
|
||||
cxxfilt.man
|
||||
dlltool.c
|
||||
defparse.y
|
||||
deflex.l
|
||||
filemode.c
|
||||
gmalloc.c
|
||||
is-ranlib.c
|
||||
|
@ -1,3 +1,13 @@
|
||||
Wed Jun 14 13:27:22 1995 Steve Chamberlain <sac@slash.cygnus.com>
|
||||
|
||||
* deflex.l, defparse.y, dlltool.c: New files.
|
||||
* Makefile.in, configure.in: Support for them.
|
||||
|
||||
Mon Jun 12 11:27:54 1995 Steve Chamberlain <sac@slash.cygnus.com>
|
||||
|
||||
* sysdump.c: Include sysdep.h
|
||||
(main): Open input with FOPEN_RB. binutils/7137
|
||||
|
||||
Fri Jun 9 17:26:11 1995 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* objdump.c (wide_output): New flag variable.
|
||||
|
135
binutils/defparse.y
Normal file
135
binutils/defparse.y
Normal file
@ -0,0 +1,135 @@
|
||||
{
|
||||
/* defparse.y - parser for .def files */
|
||||
|
||||
/* Copyright (C) 1995 Free Software Foundation, Inc.
|
||||
|
||||
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 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
|
||||
%union {
|
||||
char *id;
|
||||
int number;
|
||||
char *string;
|
||||
};
|
||||
|
||||
%token NAME, LIBRARY, DESCRIPTION, STACKSIZE, HEAPSIZE, CODE, DATA
|
||||
%token SECTIONS, EXPORTS, IMPORTS, VERSION, BASE, CONSTANT
|
||||
%token READ WRITE EXECUTE SHARED NONAME
|
||||
%token <id> ID
|
||||
%token <string> STRING
|
||||
%token <number> NUMBER
|
||||
%type <number> opt_base opt_ordinal opt_NONAME opt_CONSTANT attr attr_list opt_number
|
||||
%type <id> opt_name opt_equal_name
|
||||
|
||||
%%
|
||||
|
||||
start: start command
|
||||
| command
|
||||
;
|
||||
|
||||
command:
|
||||
NAME opt_name opt_base { def_name ($2, $3); }
|
||||
| LIBRARY opt_name opt_base { def_library ($2, $3); }
|
||||
| EXPORTS explist
|
||||
| DESCRIPTION STRING { def_description ($2);}
|
||||
| STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
|
||||
| HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);}
|
||||
| CODE attr_list { def_code ($2);}
|
||||
| DATA attr_list { def_data ($2);}
|
||||
| SECTIONS seclist
|
||||
| IMPORTS implist
|
||||
| VERSION NUMBER { def_version ($2,0);}
|
||||
| VERSION NUMBER '.' NUMBER { def_version ($2,$4);}
|
||||
;
|
||||
|
||||
|
||||
explist:
|
||||
explist expline
|
||||
| expline
|
||||
;
|
||||
|
||||
expline:
|
||||
ID opt_equal_name opt_ordinal opt_NONAME opt_CONSTANT
|
||||
{ def_exports ($1, $2, $3, $4, $5);}
|
||||
;
|
||||
implist:
|
||||
implist impline
|
||||
| impline
|
||||
;
|
||||
|
||||
impline:
|
||||
ID '=' ID '.' ID { def_import ($1,$3,$5);}
|
||||
| ID '.' ID { def_import (0, $1,$3);}
|
||||
;
|
||||
seclist:
|
||||
seclist secline
|
||||
| secline
|
||||
;
|
||||
|
||||
secline:
|
||||
ID attr_list { def_section ($1,$2);}
|
||||
;
|
||||
|
||||
attr_list:
|
||||
attr_list opt_comma attr
|
||||
| attr
|
||||
;
|
||||
|
||||
opt_comma:
|
||||
','
|
||||
|
|
||||
;
|
||||
opt_number: ',' NUMBER { $$=$2;}
|
||||
| { $$=-1;}
|
||||
;
|
||||
|
||||
attr:
|
||||
READ { $$ = 1;}
|
||||
| WRITE { $$ = 2;}
|
||||
| EXECUTE { $$=4;}
|
||||
| SHARED { $$=8;}
|
||||
;
|
||||
|
||||
opt_CONSTANT:
|
||||
CONSTANT {$$=1;}
|
||||
| {$$=0;}
|
||||
;
|
||||
opt_NONAME:
|
||||
NONAME {$$=1;}
|
||||
| {$$=0;}
|
||||
;
|
||||
|
||||
opt_name: ID { $$ =$1; }
|
||||
| { $$=""; }
|
||||
;
|
||||
|
||||
opt_ordinal:
|
||||
'@' NUMBER { $$=$2;}
|
||||
| { $$=-1;}
|
||||
;
|
||||
|
||||
opt_equal_name:
|
||||
'=' ID { $$ = $2; }
|
||||
| { $$ = 0; }
|
||||
;
|
||||
|
||||
opt_base: BASE '=' NUMBER { $$= $3;}
|
||||
| { $$=-1;}
|
||||
;
|
||||
|
||||
|
||||
|
1016
binutils/dlltool.c
Normal file
1016
binutils/dlltool.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user