Changeset 489


Ignore:
Timestamp:
Jul 31, 2003, 5:10:56 PM (22 years ago)
Author:
bird
Message:

#483: Temporary commit (Again.).

File:
1 edited

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r488 r489  
    166166    PWLDMOD             pMod;
    167167
     168
    168169    /** Import module - only if WLDSF_IMPORT is set. */
    169170    const char*         pszImpMod;
    170171
    171     /** Ordinal - WLDSF_IMPORT or WLDSF_EXPORT.
     172    /** Import Ordinal (WLDSF_IMPORT).
    172173     * 0 means no ordinal. */
    173     unsigned            iOrdinal;
     174    unsigned            iImpOrd;
     175
    174176
    175177    /** Export flags */
     
    180182        unsigned    fNoData : 1;        /* ?? */
    181183        unsigned    cParams;            /* callgate stuff, # of words to push */
    182     }                   fExport
     184    }                   fExport;
     185
     186    /** Import Ordinal (WLDSF_EXPORT).
     187     * 0 means no ordinal. */
     188    unsigned            iExpOrd;
     189
    183190
    184191    /** Symbol this is an alias for. */
     
    425432    int             cch;               
    426433    PWLDSYM         pSym;
     434    PWLDSYM         pSym2;
     435
    427436
    428437
     
    443452            unsigned long *     pul;
    444453            signed long *       pl;
    445         } u;
     454        } u, u1, u2, u3;
    446455        /** macro for getting a OMF index out of the buffer */
    447456        #define OMF_GETINDEX()  (*u.puch & 0x80 ? ((*u.pch++ & 0x7f) << 8) + *u.pch++ : *u.pch++)
     
    549558                                u.pch += cch;
    550559                                if (fOrd)
    551                                     pSym->iOrdinal = OMF_WORD();
     560                                    pSym->iImpOrd = OMF_WORD();
    552561                                break;
    553562                            }
     
    555564                            /*
    556565                             * Export definition.
     566                             * If it have an internal name the exported name will become
     567                             * an alias record.
    557568                             */
    558569                            case OMFEXT_EXPDEF:
    559570                            {
    560                                 int fOrd = *u.pch & 1;
     571                                u1 = u; u.pch++;
     572                                u2 = u; u.pch+ = 1 + *u2.pch;
     573                                u3 = u; u.pch+ = 1 + *u3.pch;
     574                               
     575                                pSym2 = NULL;
     576                                if (*u3.pch)
     577                                {
     578                                    pSym2 = symNew(pWld, WLDSF_UNDEF, u3.pch + 1, *u3.pch);
     579                                    if (!pSym2) goto failure;
     580                                    pSym = symNew(pWld, WLDSF_STRONG | WLDSF_ALIAS | WLDSF_EXPORT, u2.pch + 1, *u2.pch);
     581                                    if (!pSym) goto failure;
     582                                    pSym->pAliasFor = pSym2;
     583                                }
     584                                else
     585                                {
     586                                    pSym = symNew(pWld, WLDSF_UNDEF | WLDSF_EXPORT, u2.pch + 1, *u2.pch);
     587                                    if (!pSym) goto failure;
     588                                }
     589                                if (*u1.pch & 0x80)
     590                                    pSym->iExpOrd = GET_BYTE();
     591                                if (*u1.pch & 0x40)
     592                                    pSym->fExport.fResidentName = 1;
     593                               
     594
    561595                                break;
    562596                            }
Note: See TracChangeset for help on using the changeset viewer.