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

Linker error when compiling G1SATBCardTableModRefBS after include order changes

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b24

      Backports

        Description

        If the include order is changed sligthly the following error occurs in the Windows build:

        g1SATBCardTableModRefBS.obj : error LNK2019: unresolved external symbol "public: void __thiscall G1SATBCardTableModRefBS::write_ref_array_pre_work<class oopDesc *>(class oopDesc * *,int)" (??$write_ref_array_pre_work@PAVoopDesc@@@G1SATBCardTableModRefBS@@QAEXPAPAVoopDesc@@H@Z) referenced in function "public: virtual void __thiscall G1SATBCardTableModRefBS::write_ref_array_pre(class oopDesc * *,int,bool)" (?write_ref_array_pre@G1SATBCardTableModRefBS@@UAEXPAPAVoopDesc@@H_N@Z)
        g1SATBCardTableModRefBS.obj : error LNK2019: unresolved external symbol "public: void __thiscall G1SATBCardTableModRefBS::write_ref_array_pre_work<unsigned int>(unsigned int *,int)" (??$write_ref_array_pre_work@I@G1SATBCardTableModRefBS@@QAEXPAIH@Z) referenced in function "public: virtual void __thiscall G1SATBCardTableModRefBS::write_ref_array_pre(unsigned int *,int,bool)" (?write_ref_array_pre@G1SATBCardTableModRefBS@@UAEXPAIH_N@Z)
        jvm.dll : fatal error LNK1120: 2 unresolved externals

        Move the callers of the write_ref_array_work template to g1SATBCardTableModRefBS.cpp to avoid this problem.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mgerdin Mikael Gerdin (Inactive)
                Reporter:
                mgerdin Mikael Gerdin (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: