Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8311846

Resolve duplicate 'Thread' related symbols with JDK static linking

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 22
    • hotspot
    • None

      Linking failures were observed when statically linking the launcher executable with hotspot and user native code together:

      ```
      ld: error: duplicate symbol: Thread::Thread()
      >>> defined at <user_code>
      >>> <user_code.o>:(Thread::Thread())
      >>> defined at thread.cpp:223 (/.../src/hotspot/share/runtime/thread.cpp:223)
      >>> .../objs/thread.o:(.text+0x430)

      ld: error: duplicate symbol: vtable for Thread
      >>> defined at <user_code>
      >>> /.../<user_code.o>:(vtable for Thread)
      >>> defined at thread.cpp
      >>> .../libjvm/objs/thread.o:(.data.rel.ro+0x0)

      ld: error: duplicate symbol: Thread::~Thread()
      >>> defined at <user_code>
      >>> /.../<user_code>.o:(Thread::~Thread())
      >>> defined at thread.cpp:402 (/...src/hotspot/share/runtime/thread.cpp:402)
      >>> .../libjvm/objs/thread.o:(.text+0xE70)
      ```

            jiangli Jiangli Zhou
            jiangli Jiangli Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: