Changeset 1247
- Timestamp:
- Feb 15, 2004, 10:49:46 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/emxomf/emxomf.c
-
Property cvs2svn:cvs-rev
changed from
1.35
to1.36
r1246 r1247 730 730 struct weaksym *next = cur->next; 731 731 free (cur->name); 732 free (cur); 732 733 free (cur->module); 733 free (cur);734 734 cur = next; 735 735 } … … 1406 1406 put_idx (flat_index); 1407 1407 put_idx (index); 1408 if (!index) 1409 put_16 (0); 1408 1410 started = TRUE; 1409 1411 } … … 1467 1469 static void write_pubdef (void) 1468 1470 { 1471 write_pubdef1 (N_ABS, 0, FALSE, 0); 1472 write_pubdef1 (N_ABS, 0, TRUE, 0); 1469 1473 write_pubdef1 (N_TEXT, text_index, FALSE, 0); 1470 1474 write_pubdef1 (N_TEXT, text_index, TRUE, 0); … … 1475 1479 if (!weak_list_filename) 1476 1480 { 1481 write_pubdef1 (N_WEAKA, 0, FALSE, 0); 1482 write_pubdef1 (N_WEAKA, 0, TRUE, 0); 1477 1483 write_pubdef1 (N_WEAKT, text_index, FALSE, 0); 1478 1484 write_pubdef1 (N_WEAKT, text_index, TRUE, 0); … … 1744 1750 symbol table to find the fixup type and target 1745 1751 address. */ 1746 1747 switch (sym_ptr[r->r_symbolnum].n_type) 1752 const struct nlist *sym = &sym_ptr[r->r_symbolnum]; 1753 /*#ifdef DEBUG 1754 const char *psz = sym->n_un.n_strx + str_ptr; 1755 #endif*/ 1756 switch (sym->n_type) 1748 1757 { 1758 case N_TEXT: 1759 case N_WEAKD: 1760 case N_WEAKB: 1761 case N_WEAKA: 1762 break; 1763 1749 1764 case N_EXT: 1750 1765 case N_WEAKU: 1751 if (r->r_pcrel)1752 *(dword *)(src + r->r_address) = 0;1753 break;1754 case N_TEXT:1755 break;1756 1766 case N_TEXT|N_EXT: 1757 1767 case N_WEAKT: 1758 *(dword *)(src + r->r_address) = 0; 1768 if (r->r_pcrel) 1769 { /* example: r_address = 0xc, dw=0xfffffff6. disp=6 */ 1770 dword dw = *(dword *)(src + r->r_address); 1771 dw += r->r_address + 4; 1772 *(dword *)(src + r->r_address) = dw; 1773 } 1759 1774 break; 1760 1775 case N_DATA: 1761 1776 case N_DATA|N_EXT: 1762 case N_WEAKD:1763 1777 *(dword *)(src + r->r_address) -= start_data; 1764 1778 break; 1765 1779 case N_BSS: 1766 1780 case N_BSS|N_EXT: 1767 case N_WEAKB:1768 1781 *(dword *)(src + r->r_address) -= start_bss; 1769 1782 break; 1783 1770 1784 default: 1771 1785 error ("write_seg: Invalid symbol type (0x%.2x)", … … 2857 2871 /* make sure we have base_dir and that it's an abspath */ 2858 2872 if (!base_dir[0]) 2873 { 2859 2874 getcwd(base_dir, sizeof(base_dir)); 2875 len = strlen(base_dir); 2876 base_dir[len++] = '\\'; 2877 base_dir[len] = '\0'; 2878 } 2860 2879 else if ( (base_dir[0] == '\\' || base_dir[0] == '/') 2861 2880 && base_dir[1] != '\\' && base_dir[1] != '/') /* unc */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.