Changeset 61
- Timestamp:
- Apr 29, 2003, 6:26:33 PM (22 years ago)
- Location:
- trunk/src/emx/src/emxbind
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/emxbind/cmd.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r60 r61 47 47 relocatable = TRUE; 48 48 stack_size = 0; 49 heap_size = 0; 49 50 } 50 51 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxbind/emxbind.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r60 r61 172 172 173 173 exp.ord = stmt->export.ordinal; 174 exp.resident = ( stmt->export.flags & _MDEP_RESIDENTNAME) ? TRUE : FALSE;174 exp.resident = (!exp.ord || (stmt->export.flags & _MDEP_RESIDENTNAME)) ? TRUE : FALSE; 175 175 exp.entryname = xstrdup (stmt->export.entryname); 176 exp.flags = stmt->export.flags; 176 177 if (stmt->export.internalname[0] != 0) 177 178 exp.internalname = xstrdup (stmt->export.internalname); … … 325 326 error ("file name missing"); 326 327 else 327 {328 328 strcpy (dst, def); 329 if (ext != NULL) 330 _remext (dst); 331 } 332 if (ext != NULL) 333 _defext (dst, ext); 329 if (ext) 330 { 331 char *curext = _getext2 (dst); 332 if (curext && *curext == '.') 333 curext++; 334 if (strcmp (curext, ext)) 335 { 336 if (strlen (dst) > FNAME_SIZE - 5) 337 error ("file name too long"); 338 strcat (dst, "."); 339 strcat (dst, ext); 340 } 341 } 334 342 } 335 343 … … 433 441 434 442 opterr = FALSE; 435 443 //optswchar = "-"; 436 444 437 445 /* No command option has been seen yet. */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxbind/emxbind.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r60 r61 149 149 dword offset; 150 150 int object; 151 int flags; 151 152 }; 152 153 … … 529 530 530 531 void build_sym_hash_table (void); 532 struct nlist *find_symbol (const char *name, int underscore); 531 533 void sort_fixup (void); 532 534 void create_fixup (const struct fixup *fp, int neg); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxbind/exec.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r60 r61 167 167 { 168 168 if (os2_bind_h.text_base != TEXT_BASE 169 || os2_bind_h.text_end != TEXT_BASE + a_in_h.text_size169 || round_page (os2_bind_h.text_end) != TEXT_BASE + round_page (a_in_h.text_size) 170 170 || os2_bind_h.data_base != data_base) 171 171 return FALSE; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxbind/export.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r60 r61 23 23 #include <stdlib.h> 24 24 #include <string.h> 25 #include <sys/moddef.h> 25 26 #include "defs.h" 26 27 #include "emxbind.h" … … 47 48 if (stricmp (exp->entryname, export_data[i].entryname) == 0) 48 49 error ("export multiply defined: %s", exp->entryname); 49 if (strcmp (exp->internalname, export_data[i].internalname) == 0) 50 if ((verbosity >= 2) && 51 (strcmp (exp->internalname, export_data[i].internalname) == 0)) 50 52 printf ("emxbind: %s multiply exported (warning)\n", 51 53 exp->internalname); … … 84 86 } 85 87 88 #if 0 86 89 87 90 /* Find the symbol NAME in the a.out symbol table of the input … … 123 126 } 124 127 128 #endif 125 129 126 130 /* Compare two entries of an int array for qsort(). This function is … … 195 199 export_data[i].object = OBJ_TEXT; 196 200 break; 201 case N_BSS: 197 202 case N_DATA: 198 203 export_data[i].offset = nl->value - obj_data.virt_base; … … 231 236 { 232 237 exp = &export_data[i]; 238 if (!(exp->flags & _MDEP_NONAME)) 233 239 entry_name ((exp->resident ? &resnames : &nonresnames), 234 240 exp->entryname, exp->ord); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxbind/fixup.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r60 r61 23 23 #include <stdlib.h> 24 24 #include <string.h> 25 #include <alloca.h> 25 26 #include "defs.h" 26 27 #include "emxbind.h" … … 99 100 sym_hash_table[hash] = i; 100 101 } 102 } 103 104 105 /* Find the symbol NAME in the a.out symbol table of the input 106 executable. If UNDERSCORE is true, an underscore is prepended to 107 NAME. If the symbol is found, find_symbol() returns a pointer to 108 the symbol table entry. Otherwise, NULL is returned. */ 109 110 struct nlist *find_symbol (const char *name, int underscore) 111 { 112 int j, len; 113 const char *name1 = name; 114 115 len = strlen (name); 116 if (underscore) 117 { 118 name1 = alloca (len + 2); 119 ((char *)name1)[0] = '_'; 120 memcpy (((char *)name1) + 1, name, len + 1); 121 } 122 123 for (j = sym_hash_table[sym_hash (name1)]; j != -1; 124 j = sym_hash_next[j]) 125 { 126 const char *name2 = sym_image[j].string + str_image; 127 128 if (memcmp (name1, name2, len) == 0) 129 { 130 int t = sym_image[j].type & ~N_EXT; 131 if (t == N_TEXT || t == N_DATA || t == N_BSS) 132 return sym_image+j; 133 } 134 } 135 136 return NULL; 101 137 } 102 138 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxbind/map.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r60 r61 23 23 #include <stdlib.h> 24 24 #include <string.h> 25 #include <alloca.h> 25 26 #include "defs.h" 26 27 #include "emxbind.h" -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.