Changeset 763


Ignore:
Timestamp:
Sep 30, 2003, 8:19:21 PM (22 years ago)
Author:
bird
Message:

#456: Redid external/communal 'G' hack. For VAC365 no /DBPACK dll name is required.

Location:
trunk/src/emx/src/emxomf
Files:
2 edited

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.27 to 1.28
    r762 r763  
    10981098   À
    10991099
    1100    Symbol indices are assigned sequentially.
    1101 
    1102    Note. $hll$ is a hack for making debug info for global externals,
    1103    we need the extdef for the 2nd entry of the fake alias. */
     1100   Symbol indices are assigned sequentially.  */
    11041101
    11051102static void write_extdef (void)
     
    12871284
    12881285
    1289 /* Write ALIAS records into the output file for all indirect references.
    1290    Note. The $hll$ aliases are debug info hacks and must be skipped! */
     1286/* Write ALIAS records into the output file for all indirect references. */
    12911287
    12921288static void write_alias (void)
     
    12961292
    12971293  for (i = 0; i < sym_count - 1; ++i)
    1298     if (sym_ptr[i].n_type == (N_INDR|N_EXT) && sym_ptr[i+1].n_type == N_EXT
    1299      && !strstr(str_ptr + sym_ptr[i].n_un.n_strx, "$hll$"))
     1294    if (sym_ptr[i].n_type == (N_INDR|N_EXT) && sym_ptr[i+1].n_type == N_EXT)
    13001295      {
    13011296        init_rec (ALIAS);
     
    28932888          name = "LNKOH410";
    28942889      else if (!type || !stricmp (type, "VAC365"))
    2895           name = hll_version == 4 ?  "CPPLH436" : "CPPLH636";
     2890          name = NULL /* hll_version == 4 ?  "CPPLH436" : "CPPLH636"
     2891                        - this linker figures it out by it self. */;
    28962892      /* no DLL for link386! */
    28972893    }
  • trunk/src/emx/src/emxomf/stabshll.c

    • Property cvs2svn:cvs-rev changed from 1.23 to 1.24
    r762 r763  
    33383338        case 'G':
    33393339          /* Static storage, global scope */
    3340           #if 1 /* birds ugly hacking of 'G' allow this code path. */
     3340#if 1 /* birds ugly hacking of 'G' allow this code path. (See dbxout.c.) */
    33413341          if (where == -1)
    3342             {
    3343               /* I really hope this works! */
     3342            { /* If I got it right, dbxout.c uses N_FUN for globals in the
     3343                 text section. */
    33443344              where = symbol->n_type == N_FUN ? N_TEXT : N_DATA;
    33453345            }
    33463346          if (symbol->n_value == -12357)
    3347             { /* Special hack for external and communials variables.
    3348                  We expect the previous two symbols to be an alias for the
    3349                  undefined symbol. The first of them will then have the name
    3350                  of this record with an $hll$.* suffix. */
     3347            { /* Special hack for external and communal variables.
     3348                 We expect the previous symbol to be an 0xfe or an
     3349                 (N_UNDF|N_EXT) entry for the symbol we're processing.  */
    33513350              ++parse_ptr;
    33523351              ti = hll_type ();
    33533352
    3354               if (   *index >= 2
    3355                   && symbol[-2].n_type == (N_INDR | N_EXT)
    3356                   && symbol[-1].n_type == N_EXT
    3357                   && strstr(str_ptr + symbol[-2].n_un.n_strx, "$hll$"))
     3353              if (   *index >= 1
     3354                  && (symbol[-1].n_type == N_EXT || symbol[-1].n_type == 0xfe))
    33583355                {
    33593356                  const struct nlist *sym2;
    3360                   int fext = !strstr(str_ptr + symbol[-2].n_un.n_strx, "$hll$comm$");
    33613357
    33623358#if defined (HLL_DEBUG)
    33633359                  printf ("  type=%#x\n", ti);
    33643360#endif
    3365                   sym2 = find_symbol_ex (symbol[-1].n_un.n_strx + str_ptr, *index - 1, fext);
     3361                  sym2 = find_symbol_ex (symbol[-1].n_un.n_strx + str_ptr, *index - 1, 1);
    33663362                  if (sym2)
    33673363                    {
     
    33733369                    }
    33743370                }
    3375               warning ("Cannot find address of external variable %s", name);
     3371              warning ("Cannot find address of communal/external variable %s", name);
    33763372              return;
    33773373            }
    33783374          /* fall thru */
    33793375
    3380           #else
     3376#else /* old code */
    33813377          {
    33823378          char *psz;
     
    34043400          break;
    34053401          }
    3406           #endif
     3402#endif /* new / old 'G' handling. */
    34073403
    34083404        case 'S':
Note: See TracChangeset for help on using the changeset viewer.