Changeset 720
- Timestamp:
- Sep 24, 2003, 8:29:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/emxomf/emxomf.c
-
Property cvs2svn:cvs-rev
changed from
1.25
to1.26
r719 r720 184 184 * Link386 support HLL v3 (?) 185 185 */ 186 int hll_version = 4;186 int hll_version = 6; 187 187 188 188 /* Private variables. */ … … 1086 1086 À 1087 1087 1088 Symbol indices are assigned sequentially. */ 1088 Symbol indices are assigned sequentially. 1089 1090 Note. $hll$ is a hack for making debug info for global externals, 1091 we need the extdef for the 2nd entry of the fake alias. */ 1089 1092 1090 1093 static void write_extdef (void) … … 1096 1099 for (i = 0; i < sym_count; ++i) 1097 1100 if (sym_ptr[i].n_type == (N_INDR|N_EXT)) 1098 ++i; /* Skip immediately following entry */ 1101 { 1102 if (!strstr(str_ptr + sym_ptr[i].n_un.n_strx, "$hll$")) 1103 ++i; /* Skip immediately following entry */ 1104 } 1099 1105 else if (sym_ptr[i].n_type == N_EXT && sym_ptr[i].n_value == 0) 1100 1106 { … … 1272 1278 1273 1279 1274 /* Write ALIAS records into the output file for all indirect 1275 references.*/1280 /* Write ALIAS records into the output file for all indirect references. 1281 Note. The $hll$ aliases are debug info hacks and must be skipped! */ 1276 1282 1277 1283 static void write_alias (void) … … 1281 1287 1282 1288 for (i = 0; i < sym_count - 1; ++i) 1283 if (sym_ptr[i].n_type == (N_INDR|N_EXT) && sym_ptr[i+1].n_type == N_EXT) 1289 if (sym_ptr[i].n_type == (N_INDR|N_EXT) && sym_ptr[i+1].n_type == N_EXT 1290 && !strstr(str_ptr + sym_ptr[i].n_un.n_strx, "$hll$")) 1284 1291 { 1285 1292 init_rec (ALIAS); … … 1393 1400 int i; 1394 1401 1395 if (opt_rmunder || strip_symbols )1402 if (opt_rmunder || strip_symbols || !a_out_h->a_syms) 1396 1403 return; 1397 1404 … … 2035 2042 static void write_debug_style (void) 2036 2043 { 2044 if (strip_symbols || !a_out_h->a_syms) 2045 return; 2037 2046 init_rec (COMENT); 2038 2047 put_8 (0x80); … … 2838 2847 2839 2848 2849 /* Tell ilink which TIS (Tools I Standard) version we follow. 2850 (At least that's what I think this comment record is good for). */ 2851 static void write_tis () 2852 { 2853 unsigned short ver = 0; 2854 char *type = getenv ("EMXOMFLD_TYPE"); 2855 if (type && !stricmp (type, "VAC308")) 2856 ver = 0x0100; 2857 else if (!type || !stricmp (type, "VAC365")) 2858 ver = 0x0101; 2859 /* else: no TIS record for link386! */ 2860 2861 if (ver) 2862 { 2863 init_rec (COMENT); 2864 put_8 (0x00); 2865 put_8 (CLASS_TIS); 2866 put_mem ("TIS", 3); 2867 put_16 (ver); 2868 write_rec (); 2869 } 2870 } 2871 2872 2840 2873 /* Tell ilink which dll to use when /DBGPACK is specificed. The dllname 2841 2874 is given without extension. */ 2842 2875 static void write_dbgpack () 2843 2876 { 2844 const char *name = dbgpack_name; 2845 if (!name) 2846 { 2847 char *type = getenv ("EMXOMFLD_TYPE"); 2848 if (type && !stricmp (type, "VAC308")) 2849 name = "LNKOH410"; 2850 else if (!type || !stricmp (type, "VAC365")) 2851 name = "CPPLH436"; 2852 /* no DLL for link386! */ 2853 } 2854 2855 if (name) 2856 { 2857 init_rec (COMENT); 2858 put_8 (0x80); 2859 put_8 (CLASS_DBGPACK); 2860 put_str (name); 2861 write_rec (); 2862 } 2877 const char *name = dbgpack_name; 2878 if (strip_symbols || !a_out_h->a_syms) 2879 return; 2880 if (!name) 2881 { 2882 char *type = getenv ("EMXOMFLD_TYPE"); 2883 if (type && !stricmp (type, "VAC308")) 2884 name = "LNKOH410"; 2885 else if (!type || !stricmp (type, "VAC365")) 2886 name = hll_version == 4 ? "CPPLH436" : "CPPLH636"; 2887 /* no DLL for link386! */ 2888 } 2889 2890 if (name) 2891 { 2892 init_rec (COMENT); 2893 put_8 (0x80); 2894 put_8 (CLASS_DBGPACK); 2895 put_str (name); 2896 write_rec (); 2897 } 2863 2898 } 2864 2899 … … 3353 3388 else 3354 3389 udat_seg_name = data_seg_name; 3355 if (!strip_symbols )3390 if (!strip_symbols && a_out_h->a_syms) 3356 3391 { 3357 3392 symbols_seg_name = find_lname ("$$SYMBOLS"); … … 3361 3396 data_class_name = find_lname ("DATA"); 3362 3397 bss_class_name = find_lname ("BSS"); 3363 if (!strip_symbols )3398 if (!strip_symbols && a_out_h->a_syms) 3364 3399 { 3365 3400 debsym_class_name = find_lname ("DEBSYM"); … … 3382 3417 write_theadr (); 3383 3418 3384 /* Tell LINK386 what identifier manipulator DLL to use. */ 3385 3386 write_idmdll (); 3387 3388 /* Tell ilink what DBGPACK DLL to use. */ 3389 3390 write_dbgpack (); 3419 /* Tell ilink what TIS standard we follow. */ 3420 3421 write_tis (); 3391 3422 3392 3423 /* Write default library requests and the debug information style … … 3395 3426 write_libs (); 3396 3427 write_debug_style (); 3428 3429 /* Tell ilink what DBGPACK DLL to use. */ 3430 3431 write_dbgpack (); 3432 3433 /* Tell LINK386 what identifier manipulator DLL to use. */ 3434 3435 write_idmdll (); 3397 3436 3398 3437 /* Define all the OMF names (LNAMES record). Of course, we must not … … 3423 3462 stack_index = seg_def (stack_seg_name, stack_class_name, 0x8000, TRUE, FALSE); 3424 3463 3425 if (!strip_symbols )3464 if (!strip_symbols && a_out_h->a_syms) 3426 3465 { 3427 3466 convert_debug (); /* After seg_def of text, data & bss */ … … 3478 3517 write_set_data (); 3479 3518 3480 if (!strip_symbols )3519 if (!strip_symbols && a_out_h->a_syms) 3481 3520 { 3482 3521 write_seg (types_index, types_seg_name, tt.buf, tt.size, NULL, 0, FALSE, … … 3957 3996 3958 3997 tmp = getenv("EMXOMFLD_TYPE"); 3959 if (tmp && !stricmp(tmp, "LINK386")) 3960 hll_version = 3; 3998 if (tmp) 3999 { 4000 if (!stricmp (tmp, "VAC308")) 4001 hll_version = 4; 4002 else if (!stricmp (tmp, "LINK386")) 4003 hll_version = 3; 4004 } 3961 4005 3962 4006 /* Parse the command line options. */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.