[m-rev.] diff: ml --print-map
Zoltan Somogyi
zs at cs.mu.OZ.AU
Sat Apr 10 15:12:07 AEST 2004
scripts/parse_ml_options.in:
scripts/ml.in:
Add an option, --print-map, that allows the user to request the linker
to generate information that can be used to diagnose link problems.
cvs diff: Diffing .
Index: ml.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/ml.in,v
retrieving revision 1.109
diff -u -b -r1.109 ml.in
--- ml.in 7 Apr 2004 08:22:26 -0000 1.109
+++ ml.in 7 Apr 2004 21:36:12 -0000
@@ -308,6 +308,13 @@
exit 0
esac
+if $print_map
+then
+ PRINT_MAP_OPT="-Wl,--print-map"
+else
+ PRINT_MAP_OPT=""
+fi
+
merc_libdir_opts="\
@LIB_LIBPATH@$LIBDIR/$GRADE/$FULLARCH
@LIB_LIBPATH@$LIBDIR/$FULLARCH
@@ -375,7 +382,7 @@
none) demangle=false ;;
esac
-LINKER_PRE_FLAGS="$MSVCRT_OPTS $UNDEF_OPT $STRIP_OPTS $MAYBE_STATIC_OPT $ARCH_OPTS"
+LINKER_PRE_FLAGS="$MSVCRT_OPTS $PRINT_MAP_OPT $UNDEF_OPT $STRIP_OPTS $MAYBE_STATIC_OPT $ARCH_OPTS"
LINKER_POST_FLAGS="@LINK_OPT_SEP@ $NODEFAULTLIB_FLAG $DEBUG_FLAG $LIBDIR_OPTS $RPATH_OPT_LIST $LIBS"
case $verbose in
Index: parse_ml_options.sh-subr.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/parse_ml_options.sh-subr.in,v
retrieving revision 1.7
diff -u -b -r1.7 parse_ml_options.sh-subr.in
--- parse_ml_options.sh-subr.in 13 Apr 2003 05:48:35 -0000 1.7
+++ parse_ml_options.sh-subr.in 7 Apr 2004 21:36:12 -0000
@@ -50,6 +50,7 @@
print_gc_grade=false
print_link_command=false
print_shared_lib_link_command=false
+print_map=false
# initialize c2init options
maxcalls=40 # maximum number of calls to put in a single function
@@ -99,6 +100,8 @@
Print the command used to link executables.
--print-shared-lib-link-command
Print the command used to link shared libraries.
+ --print-map
+ Print a link map, via \`ld --print-map'.
Dynamic/static linking options:
--mercury-libs {shared, static, none}
@@ -397,6 +400,12 @@
;;
--no-print-shared-lib-link-command)
print_shared_lib_link_command=false
+ ;;
+ --print-map)
+ print_map=true
+ ;;
+ --no-print-map)
+ print_map=false
;;
#
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list