mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 16:36:07 +00:00
Ignore elf.
svn path=/trunk/; revision=28766
This commit is contained in:
parent
fa7d1ae29f
commit
3833d9dc03
1 changed files with 4 additions and 0 deletions
|
@ -795,6 +795,7 @@ int main(int argc, char* argv[])
|
||||||
void *FileData;
|
void *FileData;
|
||||||
ULONG RosSymLength;
|
ULONG RosSymLength;
|
||||||
void *RosSymSection;
|
void *RosSymSection;
|
||||||
|
char elfhdr[4] = { '\177', 'E', 'L', 'F' };
|
||||||
|
|
||||||
if (3 != argc)
|
if (3 != argc)
|
||||||
{
|
{
|
||||||
|
@ -816,6 +817,9 @@ int main(int argc, char* argv[])
|
||||||
PEDosHeader = (PIMAGE_DOS_HEADER) FileData;
|
PEDosHeader = (PIMAGE_DOS_HEADER) FileData;
|
||||||
if (PEDosHeader->e_magic != IMAGE_DOS_MAGIC || PEDosHeader->e_lfanew == 0L)
|
if (PEDosHeader->e_magic != IMAGE_DOS_MAGIC || PEDosHeader->e_lfanew == 0L)
|
||||||
{
|
{
|
||||||
|
/* Ignore elf */
|
||||||
|
if (!memcmp(PEDosHeader, elfhdr, sizeof(elfhdr)))
|
||||||
|
exit(0);
|
||||||
perror("Input file is not a PE image.\n");
|
perror("Input file is not a PE image.\n");
|
||||||
free(FileData);
|
free(FileData);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue