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

Linker error when compiling G1SATBCardTableModRefBS after include order changes

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 9
    • 9
    • hotspot
    • gc
    • 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

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

                Dates

                  Created:
                  Updated:
                  Resolved: