OSDN Git Service

2009-01-24 H.J. Lu <hongjiu.lu@intel.com>
[pf3gnuchains/gcc-fork.git] / gcc / mkmap-flat.awk
index 377731a..4a9a993 100644 (file)
 # 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;
 }