Changeset 10394 for trunk/src/win32k/ldr/xx2lxmain.cpp
- Timestamp:
- Jan 15, 2004, 11:14:58 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/ldr/xx2lxmain.cpp
r5293 r10394 1 /* $Id: xx2lxmain.cpp,v 1. 1 2001-03-11 16:37:17 birdExp $1 /* $Id: xx2lxmain.cpp,v 1.2 2004-01-15 10:14:48 sandervl Exp $ 2 2 * 3 3 * Xx2Lx main program. (Ring 3 only!) … … 33 33 #include <string.h> 34 34 #include <stdlib.h> 35 #include <io.h> 36 #include <fcntl.h> 37 #include <sys/stat.h> 35 38 #include "OS2Krnl.h" 36 39 #include "modulebase.h" … … 129 132 break; 130 133 134 135 case 'f': /* ignore internal fixups */ 136 case 'F': 137 options.fSkipFixups = TRUE; 138 break; 139 140 case 'r': /* all read-write objects */ 141 case 'R': 142 if (argv[argi][2] != 'w' && argv[argi][2] != 'W') 143 { 144 printf("Syntax error: Invalid argument, '%s'\n", argv[argi]); 145 return 5; 146 } 147 options.fAllRWObjects = TRUE; 148 break; 149 150 case 'c': /* custom odin dll name */ 151 case 'C': 152 if (!hasCustomExports()) 153 { 154 printf("Syntax error: export table file not specified (-o:).\n\n"); 155 return 5; 156 } 157 options.pszCustomDll = &argv[argi][3]; 158 break; 159 160 case 'o': /* custom odin dll ordinal mapping */ 161 case 'O': 162 { 163 int fileIn = open(&argv[argi][3], O_RDONLY, S_IREAD); 164 int sizein = (int)_filelength(fileIn); 165 166 options.pszCustomExports = (PSZ)malloc(sizein+1); 167 memset(options.pszCustomExports, 0, sizein+1); 168 read(fileIn, options.pszCustomExports, sizein); 169 close(fileIn); 170 break; 171 } 172 173 case 'x': /* custombuild exclude dll */ 174 case 'X': 175 { 176 int cch = strlen(&argv[argi][3]); 177 if (!cch) 178 { 179 printf("Syntax error: optino -x: requires a dll name!"); 180 return 5; 181 } 182 int cchNew = cch + 4; 183 if (options.pszCustomDllExclude) 184 cchNew += strlen(options.pszCustomDllExclude); 185 options.pszCustomDllExclude = (char*)realloc(options.pszCustomDllExclude, cchNew); 186 187 char *psz = options.pszCustomDllExclude; 188 if (cchNew != cch + 4) 189 psz = psz + strlen(psz); 190 191 /* copy the name in uppercase with ';' at both ends. */ 192 *psz++ = ';'; 193 for (strcpy(psz, &argv[argi][3]); *psz; psz++) 194 if (*psz >= 'a' && *psz <= 'z') 195 *psz += ('A' - 'a'); 196 *psz++ =';'; 197 *psz = '\0'; 198 break; 199 } 200 131 201 default: 132 202 printf("Syntax error: Invalid argument, '%s'\n", argv[argi]); … … 299 369 " *: Forced. Applied every time.\n" 300 370 " Default: -1*\n" 371 " -rw Make all segments writable. For use with -1+. A trick to make\n" 372 " it possible for OS/2 to load the objects following on another.\n" 373 " This of course doesn't solve the alignment difference. So if\n" 374 " you build the program pass /ALIGN:0x10000 to the linker.\n" 375 " -f Strip fixups forcing. Don't use with DLLs, may cause traps.\n" 376 "\n" 377 " Custombuild options:\n" 378 " -o:<ordfile> Ordinal file. form: <W32DLL>.<name/ord> @<CustDLLOrd>\n" 379 " -c:<custdll> Custombuild dll. After -o:!\n" 380 " -x:<dll> Exclude from custombuild. -x:MSVCRT for example.\n" 301 381 "\n" 302 382 " XxFile Input PE .\n"
Note:
See TracChangeset
for help on using the changeset viewer.