aboutsummaryrefslogtreecommitdiff
path: root/gcc/mkmap-flat.awk
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/mkmap-flat.awk')
-rw-r--r--gcc/mkmap-flat.awk14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/mkmap-flat.awk b/gcc/mkmap-flat.awk
index 377731a..4a9a993 100644
--- a/gcc/mkmap-flat.awk
+++ b/gcc/mkmap-flat.awk
@@ -18,6 +18,11 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
+# Options:
+# "-v leading_underscore=1" : Symbols in map need leading underscore.
+# "-v pe_dll=1" : Create .DEF file for Windows PECOFF
+# DLL link instead of map file.
+
BEGIN {
state = "nm";
excluding = 0;
@@ -86,7 +91,14 @@ $1 == "}" {
}
END {
+
+ if (pe_dll) {
+ # This matches SHLIB_SONAME in config/i386/t-cygming.
+ print "LIBRARY libgcc_s_1.dll";
+ print "EXPORTS";
+ }
+
for (sym in export)
- if (def[sym])
+ if (def[sym] || (pe_dll && def["_" sym]))
print sym;
}