forked from KolibriOS/kolibrios
cmm: fixups for fully MSCOFF generation
git-svn-id: svn://kolibrios.org@9680 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
03c3cc8b48
commit
3444be38ad
@ -222,6 +222,9 @@ int MakePE();
|
|||||||
int MakeObj();
|
int MakeObj();
|
||||||
void CheckUndefClassProc();
|
void CheckUndefClassProc();
|
||||||
|
|
||||||
|
// Added by Coldy
|
||||||
|
void ParseObjCommand(int cmd);
|
||||||
|
|
||||||
#ifdef _KOS_
|
#ifdef _KOS_
|
||||||
extern "C"{
|
extern "C"{
|
||||||
void con_set_title(char* title);
|
void con_set_title(char* title);
|
||||||
@ -322,6 +325,14 @@ unsigned char pari=FALSE;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//{ Added by Coldy
|
||||||
|
// If -coff (for fully mscoff)
|
||||||
|
if (ocoff && !sobj) {
|
||||||
|
am32 = TRUE;
|
||||||
|
ParseObjCommand(c_sobj);
|
||||||
|
|
||||||
|
}
|
||||||
|
//}
|
||||||
if(rawfilename==NULL){
|
if(rawfilename==NULL){
|
||||||
PrintInfo((char **)usage);
|
PrintInfo((char **)usage);
|
||||||
exit( e_noinputspecified );
|
exit( e_noinputspecified );
|
||||||
@ -622,6 +633,19 @@ unsigned int oinptr,oendinptr;
|
|||||||
return retnum;
|
return retnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ParseObjCommand(int cmd){
|
||||||
|
switch (cmd) {
|
||||||
|
case c_sobj:
|
||||||
|
sobj = TRUE;
|
||||||
|
FixUp = TRUE;
|
||||||
|
jumptomain = CALL_NONE;
|
||||||
|
case c_obj:
|
||||||
|
fobj = TRUE;
|
||||||
|
// if(comfile==file_d32)FixUp=TRUE;
|
||||||
|
FastCallApi = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int SelectComand(char *pptr,int *count)
|
int SelectComand(char *pptr,int *count)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -703,13 +727,15 @@ errlate:
|
|||||||
header=0;
|
header=0;
|
||||||
break;
|
break;
|
||||||
case c_sobj:
|
case c_sobj:
|
||||||
sobj=TRUE;
|
/* sobj=TRUE;
|
||||||
FixUp=TRUE;
|
FixUp=TRUE;
|
||||||
jumptomain=CALL_NONE;
|
jumptomain=CALL_NONE;
|
||||||
case c_obj:
|
*/ case c_obj:
|
||||||
fobj=TRUE;
|
/* fobj=TRUE;
|
||||||
// if(comfile==file_d32)FixUp=TRUE;
|
// if(comfile==file_d32)FixUp=TRUE;
|
||||||
FastCallApi=FALSE;
|
FastCallApi=FALSE;
|
||||||
|
*/
|
||||||
|
ParseObjCommand(i);
|
||||||
break;
|
break;
|
||||||
case c_me:
|
case c_me:
|
||||||
puts(meinfo);
|
puts(meinfo);
|
||||||
@ -1283,7 +1309,9 @@ int writeoutput()
|
|||||||
{
|
{
|
||||||
EXE_DOS_HEADER exeheader; // header for EXE format
|
EXE_DOS_HEADER exeheader; // header for EXE format
|
||||||
if(fobj){
|
if(fobj){
|
||||||
if(comfile==file_w32&&ocoff)return MakeCoff();
|
if(comfile==file_w32&&ocoff
|
||||||
|
// Edited by Coldy
|
||||||
|
||ocoff&&sobj)return MakeCoff();
|
||||||
return MakeObj();
|
return MakeObj();
|
||||||
}
|
}
|
||||||
if(comfile==file_w32)return MakePE();
|
if(comfile==file_w32)return MakePE();
|
||||||
|
File diff suppressed because one or more lines are too long
@ -278,7 +278,7 @@ typedef struct _PE_HEADER_
|
|||||||
|
|
||||||
typedef struct _OBJECT_ENTRY_
|
typedef struct _OBJECT_ENTRY_
|
||||||
{
|
{
|
||||||
char name[16];
|
char name[8];
|
||||||
long vsize;
|
long vsize;
|
||||||
long sectionRVA;
|
long sectionRVA;
|
||||||
long psize;
|
long psize;
|
||||||
|
Loading…
Reference in New Issue
Block a user