Loading... (original) (raw)
Solaris builds have always produced a lot of warnings when linking, like this:
ld: fatal: symbol '__JvmOffsets' has differing types:
(file /export/home/magnusi/hg/sandbox-cflags/build/solaris-sparcv9/hotspot/variant-server/libjvm/objs/JvmOffsets.o type=OBJT; file /export/home/magnusi/hg/sandbox-cflags/build/solaris-sparcv9/hotspot/variant-server/libjvm/objs/dtrace_jhelper.o type=FUNC);
This is due to an unresolved bug in dtrace. However, I just discovered that we can actually use elfedit to fix the type of the fields that the linker is complaining about, like this:
(callExecuteWithLog,(call ExecuteWithLog, (callExecuteWithLog,@, elfedit -e 'sym:st_type __JvmOffsets 1' \
-e 'sym:st_type __1cHnmethodG__vtbl_ 1' -e 'sym:st_type __1cIUniverseO_collectedHeap_ 1' \
-e 'sym:st_type __1cJCodeCacheG_heaps_ 1' -e 'sym:st_type __1cKBufferBlobG__vtbl_ 1' \
-e 'sym:st_type __1cGMethodG__vtbl_ 1' $@)
on $(DTRACE_JHELPER_OBJ).
That will make the linker quiet. (And might even allow us to add -Wl,-z,fatal-warnings to the linker, unless running with warnings-as-errors disabled)