JDK-6847305 : solaris reorder mapfiles generate too many warnings
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2009-06-02
  • Updated: 2010-04-02
  • Resolved: 2009-06-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u18Fixed 7Fixed hs16Fixed
The reorder mapfiles mention many symbols that don't exist anymore.  Previous attempts to generate new ones didn't help and removing the existing ones hurt, so for now we should remove all the ones it complains about so we don't have to see them every time.

EVALUATION Here's the shell script and awk script I used to remove the warnings. Basically it runs the compile, pulls the name of the reorder file from the log and passes the reorder file and log file to the script. The script then compares the reorder file and the warning and removes all lines that produced warnings. The output is copied back onto the old reorder file and the mapfile is regenerated and libjvm.so is relinked so you can get for warnings. --- warn --- ws=/net/smite/export/ws/reorder/ mfiles=$ws/make/solaris/makefiles work=work build() { set -x d=$1 shift rm -fr $work/$d (cd $work; gnumake -f $ws/make/solaris/Makefile $*) > $d.log 2>&1 reorder=`grep "cat mapfile" $d.log | awk '{ print $4; }'` nawk -f reorder.awk $d.log $reorder > r.txt cp r.txt $reorder rm -fr $work/$d/product/libjvm.so grep "cat mapfile" $d.log | (cd $work/$d/product; sh) (cd $work; gnumake -f $ws/make/solaris/Makefile $*) } build solaris_i486_compiler2 product build solaris_amd64_compiler2 product LP64=1 build solaris_i486_compiler1 product1 build solaris_sparc_compiler2 product build solaris_sparcv9_compiler2 product LP64=1 build solaris_sparc_compiler1 product1 --- reorder.awk --- BEGIN { system("rm warnings.txt"); } /ld: warning: mapfile: text segment: section/ { warnings[$0] = $0; warncount++; } /^data = R/ { while (!($0 ~ "^text:")) { prefix[prefixlines++] = $0; getline; } } /^text:/ { lines[linecount++] = $0; gsub("[%:; \t]", " "); n = split($0, f); if (n == 3) { printf "ld: warning: mapfile: text segment: section `.text%%%s' does not appear in any input file\n", f[3] > "warnings.txt"; } else if (n == 4) { printf "ld: warning: mapfile: text segment: section `.text%%%s' does not appear in file `%s'\n", f[3], f[4] > "warnings.txt"; } else { print "what?"; print $0; print n; print f[1]; print f[2]; print f[3]; print f[4]; print f[5]; exit(1); } next; } END { for (i = 0; i < prefixlines; i++) { print prefix[i]; } system("c++filt warnings.txt > warnings.processed.txt"); inline = 0; while ((getline < "warnings.processed.txt") == 1) { orig = lines[inline]; warning = $0; if (warning in warnings) { delete warnings[warning]; warncount--; } else { print orig; } inline++; } }

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/435f0808b826

EVALUATION remove all lines that generate warnings