[commit: ghc] master: When making a DLL, print the number of symbols that are in it (ff59fea)

Ian Lynagh igloo at earth.li
Sat Apr 6 21:37:00 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/ff59fea8c49ad01fe42921878ea325c6f5766b68

>---------------------------------------------------------------

commit ff59fea8c49ad01fe42921878ea325c6f5766b68
Author: Ian Lynagh <igloo at earth.li>
Date:   Sat Apr 6 15:46:28 2013 +0100

    When making a DLL, print the number of symbols that are in it

>---------------------------------------------------------------

 rules/build-package-way.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk
index bae73e3..894f44e 100644
--- a/rules/build-package-way.mk
+++ b/rules/build-package-way.mk
@@ -158,6 +158,7 @@ define build-dll
 	    -no-auto-link-packages \
 	    -o $6
 # Now check that the DLL doesn't have too many symbols. See trac #5987.
+	echo -n "Number of symbols in $6: "; $(OBJDUMP) -p $6 | sed -n "1,/^.Ordinal\/Name Pointer/ D; p; /^$$/ q" | tail -n +2 | wc -l
 	case `$(OBJDUMP) -p $6 | sed -n "1,/^.Ordinal\/Name Pointer/ D; p; /^$$/ q" | grep "\[ *0\]" | wc -l` in 1) echo DLL $6 OK;; 0) echo No symbols in DLL $6; exit 1;; [0-9]*) echo Too many symbols in DLL $6; $(OBJDUMP) -p $6 | sed -n "1,/^.Ordinal\/Name Pointer/ D; p; /^$$/ q" | tail; exit 1;; *) echo bad DLL $6; exit 1;; esac
 endef
 





More information about the ghc-commits mailing list