JDK-6890703: dtrace.o causes linker warnings

Volker Simonis volker.simonis at gmail.com
Thu Nov 7 00:18:38 PST 2013


Hi,

so it seems this is really a DTrace bug. The OpenSolaris folks have
opened the following issue for it:

https://www.illumos.org/issues/4296

Can somebody of you Oracle folks please do the same for Oracle Solaris/DTrace?

Thanks,
Volker


On Thu, Oct 24, 2013 at 7:46 PM, Volker Simonis
<volker.simonis at gmail.com> wrote:
> Hi,
>
> we always get linker warnings like:
>
> Linking vm...
> ld: warning: symbol `Universe::_narrow_oop' has differing types:
>         (file universe.o type=OBJT; file dtrace.o type=FUNC);
> ld: warning: symbol `Universe::_methodKlassObj' has differing types:
>         (file universe.o type=OBJT; file dtrace.o type=FUNC);
>
> when compiling the HotSpot on Solaris.
>
> I just found that there already exists a bug for this issue:
> "JDK-6890703: dtrace.o causes linker warnings"
> (https://bugs.openjdk.java.net/browse/JDK-6890703) but unfortunately
> no solution.
>
> I also found out, that this problem is related to newer dtrace versions.
>
> Taking the following 'extern.d' dtrace program:
>
> extern UseCompressedOops;
>
> dtrace:helper:
> {
>   this->done = ``UseCompressedOops;
> }
>
> and compiling it with '/usr/sbin/dtrace -64 -D_LP64 -C -I. -G
> -xlazyload -o /tmp/dtrace.o -s extern.d' results in following object
> files:
>
> For dtrace: Sun D 1.4.1
>
> [Index] Value Size Type Bind Other Shndx Name
>
> [2] | 0| 2009|OBJT |GLOB |0 |2 |___SUNW_dof
> [1] | 0| 0|FUNC |GLOB |0 |UNDEF |UseCompressedOops
>
> but for dtrace: Sun D 1.1
>
> [Index] Value Size Type Bind Other Shndx Name
>
> [2] | 0| 2007|OBJT |GLOB |0 |2 |___SUNW_dof
> [1] | 0| 0|NOTY |GLOB |0 |UNDEF |UseCompressedOops
>
> So the newer dtrace makes the external reference to '
> UseCompressedOops' of type 'FUNC' which conflicts with HotSpot's
> definition of UseCompressedOops' and results in a warning. On the
> other hand, the old version of dtrace makes the external reference to
> be of type 'NOTY' which doesn't seem to bother the linker.
>
> I have no idea if this behaviour can be influenced (e.g. by giving the
> externel reference the right type in D).
>
> Is there any DTrace wizard out there who knows how this can be fixed?
>
> Thank you and best regards,
> Volker


More information about the hotspot-dev mailing list