Changeset 515
- Timestamp:
- Aug 4, 2003, 1:05:27 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/emxomf/emxomf.c
-
Property cvs2svn:cvs-rev
changed from
1.18
to1.19
r514 r515 580 580 if (t == N_TEXT || t == N_DATA || t == N_BSS 581 581 /* 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) 583 583 || (t == 0 && sym_ptr[j].n_value != 0)) 584 584 return sym_ptr+j; … … 1110 1110 add_extdef (&started, str_ptr + sym_ptr[i].n_un.n_strx); 1111 1111 } 1112 #if 1 /* this isn't actually required if only the assembler could do what it's supposed to... */ 1112 1113 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 1114 1115 external records for this, perhaps... 1115 1116 At least I can't see why this will be wrong. */ … … 1118 1119 add_extdef (&started, name); 1119 1120 } 1121 #endif 1120 1122 if (started) 1121 1123 write_rec (); … … 1144 1146 init_rec (COMENT); 1145 1147 put_8 (0x80); 1146 put_8 ( 0xa8);1148 put_8 (CLASS_WKEXT); 1147 1149 put_idx (sym_more[i].index); 1148 1150 put_idx (weak_zero_index); … … 1155 1157 mark it as N_WEAKU so that it is later writen within a WKEXT record. 1156 1158 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 1159 1161 Weak Hack Method 1. 1160 1162 */ … … 1205 1207 /*SETTYPE (N_WEAKU);*/ 1206 1208 } 1207 #endif 1209 #endif 1208 1210 #undef SETTYPE 1209 1211 } … … 1227 1229 static const char *weak_process_name(const struct nlist *pSym, const char *pszOrgName, char *pachName, int cchName) 1228 1230 { 1229 switch ( sym_ptr->n_type)1231 switch (pSym->n_type) 1230 1232 { 1231 1233 /* … … 1323 1325 started = FALSE; 1324 1326 for (i = 0; i < sym_count; ++i) 1325 if ( (sym_ptr[i].n_type & ~N_EXT)== type1326 || ( 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) 1327 1329 ) 1328 1330 { … … 1422 1424 { 1423 1425 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); 1425 1431 if (!weak_list_filename) 1426 1432 { 1427 1433 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); 1429 1439 } 1430 1440 /* kso #456 2003-06-10: The debugger looks for 'main' not '_main'. */ 1431 1441 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 }1446 1442 } 1447 1443 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.