Changeset 515


Ignore:
Timestamp:
Aug 4, 2003, 1:05:27 AM (22 years ago)
Author:
bird
Message:

#483: Bugfixing.

File:
1 edited

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.18 to 1.19
    r514 r515  
    580580                if (t == N_TEXT || t == N_DATA || t == N_BSS
    581581                    /* kso #465 2003-06-04: Find weak symbols too. */
    582                     || (t >= N_WEAKA && t <= N_WEAKB)
     582                    || (sym_ptr[j].n_type >= N_WEAKA && sym_ptr[j].n_type <= N_WEAKB)
    583583                    || (t == 0 && sym_ptr[j].n_value != 0))
    584584                  return sym_ptr+j;
     
    11101110        add_extdef (&started, str_ptr + sym_ptr[i].n_un.n_strx);
    11111111      }
     1112#if 1 /* this isn't actually required if only the assembler could do what it's supposed to... */
    11121113    else if (sym_ptr[i].n_type >= N_WEAKA && sym_ptr[i].n_type <= N_WEAKB)
    1113       { /* Not convinced about this yet, I mean there should really be 
     1114      { /* Not convinced about this yet, I mean there should really be
    11141115           external records for this, perhaps...
    11151116           At least I can't see why this will be wrong. */
     
    11181119        add_extdef (&started, name);
    11191120      }
     1121#endif
    11201122  if (started)
    11211123    write_rec ();
     
    11441146        init_rec (COMENT);
    11451147        put_8 (0x80);
    1146         put_8 (0xa8);
     1148        put_8 (CLASS_WKEXT);
    11471149        put_idx (sym_more[i].index);
    11481150        put_idx (weak_zero_index);
     
    11551157   mark it as N_WEAKU so that it is later writen within a WKEXT record.
    11561158   Also we convert a.out-style weak symbols here as normal public symbols,
    1157    as the sense of weak is reverse in OMF 
    1158    
     1159   as the sense of weak is reverse in OMF
     1160
    11591161   Weak Hack Method 1.
    11601162   */
     
    12051207         /*SETTYPE (N_WEAKU);*/
    12061208      }
    1207     #endif 
     1209    #endif
    12081210#undef SETTYPE
    12091211}
     
    12271229static const char *weak_process_name(const struct nlist *pSym, const char *pszOrgName, char *pachName, int cchName)
    12281230{
    1229     switch (sym_ptr->n_type)
     1231    switch (pSym->n_type)
    12301232    {
    12311233        /*
     
    13231325  started = FALSE;
    13241326  for (i = 0; i < sym_count; ++i)
    1325     if (   (sym_ptr[i].n_type & ~N_EXT) == type
    1326         || (type >= N_WEAKU && type <= N_WEAKB && sym_ptr[i].n_type == type)
     1327    if (    sym_ptr[i].n_type == type
     1328        || ((type < N_WEAKU || type > N_WEAKB) && (sym_ptr[i].n_type & ~N_EXT) == type)
    13271329        )
    13281330      {
     
    14221424{
    14231425  write_pubdef1 (N_TEXT, text_index, FALSE, 0);
    1424   write_pubdef1 (N_TEXT, text_index, TRUE, 0);
     1426  write_pubdef1 (N_TEXT, text_index, TRUE,  0);
     1427  write_pubdef1 (N_DATA, udat_index, FALSE, text_size);
     1428  write_pubdef1 (N_DATA, udat_index, TRUE,  text_size);
     1429  write_pubdef1 (N_BSS,  bss_index,  FALSE, text_size + data_size);
     1430  write_pubdef1 (N_BSS,  bss_index,  TRUE,  text_size + data_size);
    14251431  if (!weak_list_filename)
    14261432  {
    14271433      write_pubdef1 (N_WEAKT, text_index, FALSE, 0);
    1428       write_pubdef1 (N_WEAKT, text_index, TRUE, 0);
     1434      write_pubdef1 (N_WEAKT, text_index, TRUE,  0);
     1435      write_pubdef1 (N_WEAKD, udat_index, FALSE, text_size);
     1436      write_pubdef1 (N_WEAKD, udat_index, TRUE,  text_size);
     1437      write_pubdef1 (N_WEAKB, bss_index,  FALSE, text_size + data_size);
     1438      write_pubdef1 (N_WEAKB, bss_index,  TRUE,  text_size + data_size);
    14291439  }
    14301440  /* kso #456 2003-06-10: The debugger looks for 'main' not '_main'. */
    14311441  write_pubdef_main ();
    1432   write_pubdef1 (N_DATA, udat_index, FALSE, text_size);
    1433   write_pubdef1 (N_DATA, udat_index, TRUE, text_size);
    1434   if (!weak_list_filename)
    1435   {
    1436       write_pubdef1 (N_WEAKD, text_index, FALSE, 0);
    1437       write_pubdef1 (N_WEAKD, text_index, TRUE, 0);
    1438   }
    1439   write_pubdef1 (N_BSS, bss_index, FALSE, text_size + data_size);
    1440   write_pubdef1 (N_BSS, bss_index, TRUE, text_size + data_size);
    1441   if (!weak_list_filename)
    1442   {
    1443       write_pubdef1 (N_WEAKB, bss_index, FALSE, text_size + data_size);
    1444       write_pubdef1 (N_WEAKB, bss_index, TRUE, text_size + data_size);
    1445   }
    14461442}
    14471443
Note: See TracChangeset for help on using the changeset viewer.