make/windows/build_vm_def.sh

Tue, 26 Jul 2016 11:15:09 +0800

author
fujie
date
Tue, 26 Jul 2016 11:15:09 +0800
changeset 38
f0e26f502a50
parent 0
f90c822e73f8
child 6876
710a3c8b516e
permissions
-rw-r--r--

Instruction decoding support: add movn and movz in MIPS disassembler.

aoqi@0 1 #
aoqi@0 2 # Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 #
aoqi@0 5 # This code is free software; you can redistribute it and/or modify it
aoqi@0 6 # under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 # published by the Free Software Foundation.
aoqi@0 8 #
aoqi@0 9 # This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 12 # version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 13 # accompanied this code).
aoqi@0 14 #
aoqi@0 15 # You should have received a copy of the GNU General Public License version
aoqi@0 16 # 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 18 #
aoqi@0 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 20 # or visit www.oracle.com if you need additional information or have any
aoqi@0 21 # questions.
aoqi@0 22 #
aoqi@0 23 #
aoqi@0 24
aoqi@0 25 # This shell script builds a vm.def file for the current VM variant.
aoqi@0 26 # The .def file exports vtbl symbols which allow the Serviceability
aoqi@0 27 # Agent to run on Windows. See make/windows/projectfiles/*/vm.def
aoqi@0 28 # for more information.
aoqi@0 29 #
aoqi@0 30 # The script expects to be executed in the directory containing all of
aoqi@0 31 # the object files.
aoqi@0 32
aoqi@0 33 # Note that we currently do not have a way to set HotSpotMksHome in
aoqi@0 34 # the batch build, but so far this has not seemed to be a problem. The
aoqi@0 35 # reason this environment variable is necessary is that it seems that
aoqi@0 36 # Windows truncates very long PATHs when executing shells like MKS's
aoqi@0 37 # sh, and it has been found that sometimes `which sh` fails.
aoqi@0 38 if [ "x$HOTSPOTMKSHOME" != "x" ]; then
aoqi@0 39 MKS_HOME="$HOTSPOTMKSHOME"
aoqi@0 40 else
aoqi@0 41 SH=`which sh`
aoqi@0 42 MKS_HOME=`dirname "$SH"`
aoqi@0 43 fi
aoqi@0 44
aoqi@0 45 AWK="$MKS_HOME/awk.exe"
aoqi@0 46 if [ ! -e $AWK ]; then
aoqi@0 47 AWK="$MKS_HOME/gawk.exe"
aoqi@0 48 fi
aoqi@0 49 GREP="$MKS_HOME/grep.exe"
aoqi@0 50 SORT="$MKS_HOME/sort.exe"
aoqi@0 51 UNIQ="$MKS_HOME/uniq.exe"
aoqi@0 52 CAT="$MKS_HOME/cat.exe"
aoqi@0 53 RM="$MKS_HOME/rm.exe"
aoqi@0 54 DUMPBIN="link.exe /dump"
aoqi@0 55
aoqi@0 56 if [ "$1" = "-nosa" ]; then
aoqi@0 57 echo EXPORTS > vm.def
aoqi@0 58 echo ""
aoqi@0 59 echo "***"
aoqi@0 60 echo "*** Not building SA: BUILD_WIN_SA != 1"
aoqi@0 61 echo "*** C++ Vtables NOT included in vm.def"
aoqi@0 62 echo "*** This jvm.dll will NOT work properly with SA."
aoqi@0 63 echo "***"
aoqi@0 64 echo "*** When in doubt, set BUILD_WIN_SA=1, clean and rebuild."
aoqi@0 65 echo "***"
aoqi@0 66 echo ""
aoqi@0 67 exit
aoqi@0 68 fi
aoqi@0 69
aoqi@0 70 echo "EXPORTS" > vm1.def
aoqi@0 71
aoqi@0 72 # When called from IDE the first param should contain the link version, otherwise may be nill
aoqi@0 73 if [ "x$1" != "x" ]; then
aoqi@0 74 LD_VER="$1"
aoqi@0 75 fi
aoqi@0 76
aoqi@0 77 if [ "x$LD_VER" != "x800" -a "x$LD_VER" != "x900" -a "x$LD_VER" != "x1000" ]; then
aoqi@0 78 $DUMPBIN /symbols *.obj | "$GREP" "??_7.*@@6B@" | "$GREP" -v "type_info" | "$AWK" '{print $7}' | "$SORT" | "$UNIQ" > vm2.def
aoqi@0 79 else
aoqi@0 80 # Can't use pipes when calling cl.exe or link.exe from IDE. Using transit file vm3.def
aoqi@0 81 $DUMPBIN /OUT:vm3.def /symbols *.obj
aoqi@0 82 "$CAT" vm3.def | "$GREP" "??_7.*@@6B@" | "$GREP" -v "type_info" | "$AWK" '{print $7}' | "$SORT" | "$UNIQ" > vm2.def
aoqi@0 83 "$RM" -f vm3.def
aoqi@0 84 fi
aoqi@0 85
aoqi@0 86 "$CAT" vm1.def vm2.def > vm.def
aoqi@0 87 "$RM" -f vm1.def vm2.def

mercurial