Merge pull request #3 from tkchia/ia16-elf-gcc

Minor fixes for mkfiles/gcc.mak and utils/exeflat.c
This commit is contained in:
bartoldeman 2018-04-07 15:42:10 -04:00 committed by GitHub
commit fe57c89061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -67,7 +67,7 @@ ifeq ($(LOADSEG)0, 0)
LOADSEG=0x60
endif
INITPATCH=objcopy --redefine-sym ___umodsi3=_init_umodsi3 --redefine-sym ___udivsi3=_init_udivsi3 --redefine-sym ___ashlsi3=_init_ashlsi3 --redefine-sym ___lshrsi3=_init_lshrsi3
INITPATCH=ia16-elf-objcopy --redefine-sym ___umodsi3=_init_umodsi3 --redefine-sym ___udivsi3=_init_udivsi3 --redefine-sym ___ashlsi3=_init_ashlsi3 --redefine-sym ___lshrsi3=_init_lshrsi3
CLDEF=1
CLT=gcc -DDOSC_TIME_H -I../hdr -o $@
CLC=$(CLT)

View File

@ -125,8 +125,8 @@ static int exeflat(const char *srcfile, const char *dstfile,
((DWORD) (header->exPages - 1) << 9) + header->exExtraBytes -
header->exHeaderSize * 16UL;
printf("image size (less header) = %lu = 0x%lx\n", size, size);
printf("first relocation offset = %u = 0x%u\n", header->exOverlay,
header->exOverlay);
printf("first relocation offset = %u = 0x%x\n", header->exRelocTable,
header->exRelocTable);
/* first read file into memory chunks */
fseek(src, header->exHeaderSize * 16UL, SEEK_SET);
@ -150,7 +150,7 @@ static int exeflat(const char *srcfile, const char *dstfile,
}
if (fread(*curbuf, sizeof(char), bufsize, src) != bufsize)
{
printf("Source file read error %ld %d\n", to_xfer, bufsize);
printf("Source file read error %ld %d\n", to_xfer, (int)bufsize);
exit(1);
}
}
@ -381,7 +381,7 @@ int main(int argc, char **argv)
if (silentcount >= LENGTH(silentSegments))
{
printf("can't handle more then %d silent's\n",
LENGTH(silentSegments));
(int)LENGTH(silentSegments));
exit(1);
}