mkmap-symver.awk (117395) | mkmap-symver.awk (122180) |
---|---|
1# Generate an ELF symbol version map a-la Solaris and GNU ld. 2# Contributed by Richard Henderson <rth@cygnus.com> 3# 4# This file is part of GCC. 5# 6# GCC is free software; you can redistribute it and/or modify it under 7# the terms of the GNU General Public License as published by the Free 8# Software Foundation; either version 2, or (at your option) any later --- 81 unchanged lines hidden (view full) --- 90 91function output(lib) { 92 if (done[lib]) 93 return; 94 done[lib] = 1; 95 if (inherit[lib]) 96 output(inherit[lib]); 97 | 1# Generate an ELF symbol version map a-la Solaris and GNU ld. 2# Contributed by Richard Henderson <rth@cygnus.com> 3# 4# This file is part of GCC. 5# 6# GCC is free software; you can redistribute it and/or modify it under 7# the terms of the GNU General Public License as published by the Free 8# Software Foundation; either version 2, or (at your option) any later --- 81 unchanged lines hidden (view full) --- 90 91function output(lib) { 92 if (done[lib]) 93 return; 94 done[lib] = 1; 95 if (inherit[lib]) 96 output(inherit[lib]); 97 |
98 printf("%s {\n", lib); 99 sawglobal = 0; | 98 empty=1 |
100 for (sym in ver) 101 if ((ver[sym] == lib) && (sym in def)) 102 { | 99 for (sym in ver) 100 if ((ver[sym] == lib) && (sym in def)) 101 { |
103 if (!sawglobal) | 102 if (empty) |
104 { | 103 { |
104 printf("%s {\n", lib); |
|
105 printf(" global:\n"); | 105 printf(" global:\n"); |
106 sawglobal = 1; | 106 empty = 0; |
107 } 108 printf("\t%s;\n", sym); 109 if (dotsyms) 110 printf("\t.%s;\n", sym); 111 } 112 | 107 } 108 printf("\t%s;\n", sym); 109 if (dotsyms) 110 printf("\t.%s;\n", sym); 111 } 112 |
113 if (inherit[lib]) | 113 if (empty) 114 { 115 for (l in libs) 116 if (inherit[l] == lib) 117 inherit[l] = inherit[lib]; 118 } 119 else if (inherit[lib]) |
114 printf("} %s;\n", inherit[lib]); 115 else 116 printf ("\n local:\n\t*;\n};\n"); 117} | 120 printf("} %s;\n", inherit[lib]); 121 else 122 printf ("\n local:\n\t*;\n};\n"); 123} |