Author: arty Date: Sun Sep 2 15:10:27 2007 New Revision: 28765
URL: http://svn.reactos.org/svn/reactos?rev=28765&view=rev Log: Ignore elf executables.
Modified: trunk/reactos/tools/pefixup.c
Modified: trunk/reactos/tools/pefixup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/pefixup.c?rev=28765&a... ============================================================================== --- trunk/reactos/tools/pefixup.c (original) +++ trunk/reactos/tools/pefixup.c Sun Sep 2 15:10:27 2007 @@ -229,6 +229,7 @@ { int fd_in, fd_out; long len; + char hdrbuf[4] = { }, elfhdr[4] = { '\177', 'E', 'L', 'F' }; PIMAGE_SECTION_HEADER section_header; PIMAGE_DATA_DIRECTORY data_dir; unsigned int i; @@ -276,6 +277,13 @@ printf("Can't open input file.\n"); return 1; } + + /* + * PowerPC ReactOS uses elf, so doesn't need pefixup + */ + len = read(fd_in, hdrbuf, sizeof(elfhdr)); + if (!memcmp(hdrbuf, elfhdr, sizeof(elfhdr))) + return 0;
len = lseek(fd_in, 0, SEEK_END); if (len < sizeof(IMAGE_DOS_HEADER))