-
Bug
-
Resolution: Fixed
-
P3
-
11
-
None
-
b04
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:
$(call ExecuteWithLog, $@, 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)
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:
$(call ExecuteWithLog, $@, 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)
- relates to
-
JDK-8199339 JDK-8198859 broke solaris x64
-
- Resolved
-
-
JDK-6890703 dtrace.o causes linker warnings
-
- Closed
-