Changeset 544 for trunk/src/emx


Ignore:
Timestamp:
Aug 7, 2003, 9:46:41 PM (22 years ago)
Author:
bird
Message:

Temporary commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/emxomf/weakld.c

    • Property cvs2svn:cvs-rev changed from 1.18 to 1.19
    r543 r544  
    353353    /** string pool for miscellaneous string. */
    354354    struct strpool *    pStrMisc;
     355
     356    /** @group ILINK Crash Workaround
     357     * @{ */
     358    /** Maximum number of externals in a object module. */
     359    unsigned            cMaxObjExts;
     360
     361    /** Maximum number of externals in a library module. */
     362    unsigned            cMaxLibExts;
     363    /** @} */
    355364};
    356365typedef struct wld WLD;
     
    24112420            papExts[i]->fFlags &= ~WLDSF_UNCERTAIN;
    24122421
     2422    /* Max extdefs values. */
     2423    if (fLibSearch)
     2424    {
     2425        if (pWld->cMaxLibExts < cExts)
     2426            pWld->cMaxLibExts = cExts;
     2427    }
     2428    else
     2429    {
     2430        if (pWld->cMaxObjExts < cExts)
     2431            pWld->cMaxObjExts = cExts;
     2432    }
     2433
    24132434    return 0;
    24142435
     
    35403561                    if (!rc)
    35413562                    {
     3563                        /* Check if we need to fake a lot's of externals for working around an ILINK bug. */
     3564                        if (pWld->cMaxObjExts < pWld->cMaxLibExts && !(pWld->fFlags & WLDC_LINKER_LINK386))
     3565                        {
     3566                            int i;
     3567                            if (!param.cAliases)
     3568                            {
     3569                                rc = wldObjStart(pWld, phFile, "extdefshack.obj");
     3570                                param.cAliases++;
     3571                            }
     3572
     3573                            /* issue a shitload of extdefs. */
     3574                            omf.hdr.chType = EXTDEF;
     3575                            omf.ach[0] = strlen("WEAK$ZERO");
     3576                            memcmp(&omf.ach[1], "WEAK$ZERO", omf.ach[0]);
     3577                            omf.ach[omf.ach[0] + 2] = 0;
     3578                            omf.hdr.cb = omf.ach[0] + 3;
     3579                            for (i = 0; i < pWld->cMaxLibExts; i++)
     3580                            {
     3581                            }
     3582                        }
     3583
    35423584                        if (ftell(phFile) != offAlias)
    35433585                        {
    35443586                            /* end the last object? */
    3545                             if ((pWld->fFlags & WLDC_LINKER_LINK386) && param.cAliases > 1)
     3587                            if (pWld->fFlags & WLDC_LINKER_LINK386)
    35463588                            {
    3547                                 rc = wldObjEnd(pWld, phFile, 32);
     3589                                if (param.cAliases)
     3590                                    rc = wldObjEnd(pWld, phFile, 32);
    35483591                                if (!rc)
    35493592                                {
     
    35593602                                }
    35603603                            }
    3561                             else
     3604                            else if (param.cAliases)
    35623605                                rc = wldObjEnd(pWld, phFile, 1);
    35633606                        }
Note: See TracChangeset for help on using the changeset viewer.