Changeset 62
- Timestamp:
- Apr 29, 2003, 7:13:20 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/emxexp/emxexp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r61 r62 42 42 static int noname_flag = FALSE; 43 43 static int bss_flag = FALSE; 44 static int weak_flag = FALSE; 44 45 45 46 static FILE *out_file; … … 106 107 " -o Output ordinal numbers, starting at 1\n" 107 108 " -o<ordinal> Output ordinal numbers, starting at <ordinal>\n" 108 " -u Also export uninitialized variables\n", 109 " -u Also export uninitialized variables\n" 110 " -w Allow export of weak symbols\n", 109 111 stderr); 110 112 exit (1); … … 185 187 sym = (inp_buf + sizeof (struct a_out_header) + a_out_h->text_size 186 188 + a_out_h->data_size + a_out_h->trsize + a_out_h->drsize); 189 if (!a_out_h->sym_size) 190 return; 187 191 str_ptr = sym + a_out_h->sym_size; 188 192 if (str_ptr + 4 - inp_buf > size) … … 195 199 196 200 for (i = 0; i < sym_count; ++i) 197 if (sym_ptr[i].type == (N_TEXT|N_EXT) || sym_ptr[i].type == (N_DATA|N_EXT)) 201 if (sym_ptr[i].type == (N_TEXT|N_EXT) || 202 sym_ptr[i].type == (N_DATA|N_EXT) || 203 (weak_flag && 204 (sym_ptr[i].type == N_WEAKT || 205 sym_ptr[i].type == N_WEAKD))) 198 206 { 199 207 name = str_ptr + sym_ptr[i].string; … … 202 210 export (name); 203 211 } 204 else if (sym_ptr[i].type == N_EXT && sym_ptr[i].value != 0) 212 else if ((sym_ptr[i].type == N_EXT || 213 (weak_flag && sym_ptr[i].type == N_WEAKB)) && 214 sym_ptr[i].value != 0) 205 215 { 206 216 name = str_ptr + sym_ptr[i].string; … … 577 587 _wildcard (&argc, &argv); 578 588 opterr = 0; 579 589 //optswchar = "-"; 580 590 optind = 0; 581 while ((c = getopt (argc, argv, "no::u ")) != EOF)591 while ((c = getopt (argc, argv, "no::uw")) != EOF) 582 592 { 583 593 switch (c) … … 601 611 bss_flag = TRUE; 602 612 break; 613 case 'w': 614 weak_flag = TRUE; 615 break; 603 616 default: 604 617 error ("Invalid option"); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.