1 # Generate a flat list of symbols to export.
2 # Contributed by Richard Henderson <rth@cygnus.com>
4 # This file is part of GNU CC.
6 # GNU CC is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # GNU CC is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GNU CC; see the file COPYING. If not, write to
18 # the Free Software Foundation, 59 Temple Place - Suite 330,
19 # Boston MA 02111-1307, USA.
25 # Remove comment and blank lines.
30 # We begin with nm input. Collect the set of symbols that are present
31 # so that we can elide undefined symbols.
33 state ==
"nm" && /^
%%/ {
38 state ==
"nm" && ($
1 ==
"U" || $
2 ==
"U") {
42 state ==
"nm" && NF ==
3 {
51 # Now we process a simplified variant of the Solaris symbol version
52 # script. We have one symbol per line, no semicolons, simple markers
53 # for beginning and ending each section, and %inherit markers for
54 # describing version inheritence. A symbol may appear in more than
55 # one symbol version, and the last seen takes effect.
57 NF ==
3 && $
1 ==
"%inherit" {
61 NF ==
2 && $
2 ==
"{" {