Skip to content

Commit

Permalink
FASTTRACK: Merge #2, #4
Browse files Browse the repository at this point in the history
Print format change and classic build support removal
  • Loading branch information
skliper committed Oct 2, 2019
2 parents 538956f + 9c691ad commit be009b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 69 deletions.
6 changes: 0 additions & 6 deletions Makefile

This file was deleted.

20 changes: 10 additions & 10 deletions elf2cfetbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ void set_st_size(union Elf_Sym *Symbol, uint64_t new_value)
{
Symbol->Sym32.st_size = (uint32_t) new_value;
if (Symbol->Sym32.st_size != new_value) {
printf("ERROR: Sym32.st_size can not hold %ld\n", new_value);
printf("ERROR: Sym32.st_size can not hold %lu\n", new_value);
}
}
else
Expand Down Expand Up @@ -1680,7 +1680,7 @@ int32 GetSectionHeader(int32 SectionIndex, union Elf_Shdr *SectionHeader)
}
SymbolTableEntrySize = get_sh_entsize(SectionHeader);
NumSymbols = (get_sh_size(SectionHeader) / get_sh_entsize(SectionHeader)) - 1;
sprintf(VerboseStr, "SHT_SYMTAB (2) - # Symbols = %ld", NumSymbols);
sprintf(VerboseStr, "SHT_SYMTAB (2) - # Symbols = %lu", NumSymbols);
break;

case SHT_STRTAB:
Expand Down Expand Up @@ -1779,7 +1779,7 @@ int32 GetSymbol(int32 SymbolIndex, union Elf_Sym *Symbol)
int32 i=0;
if (SeekOffset != calculated_offset)
{
printf("Error: SeekOffset may not be %ld\n", calculated_offset);
printf("Error: SeekOffset may not be %lu\n", calculated_offset);
Status = FAILED;
}
else
Expand Down Expand Up @@ -1893,8 +1893,8 @@ void PrintElfHeader32(union Elf_Ehdr ElfHeader)
{
if (Verbose) printf(" e_version = %d\n", get_e_version(&ElfHeader));
if (Verbose) printf(" e_entry = 0x%x\n", ElfHeader.Ehdr32.e_entry);
if (Verbose) printf(" e_phoff = 0x%08x (%d)\n", ElfHeader.Ehdr32.e_phoff, ElfHeader.Ehdr32.e_phoff);
if (Verbose) printf(" e_shoff = 0x%08x (%d)\n", ElfHeader.Ehdr32.e_shoff, ElfHeader.Ehdr32.e_shoff);
if (Verbose) printf(" e_phoff = 0x%08x (%u)\n", ElfHeader.Ehdr32.e_phoff, ElfHeader.Ehdr32.e_phoff);
if (Verbose) printf(" e_shoff = 0x%08x (%u)\n", ElfHeader.Ehdr32.e_shoff, ElfHeader.Ehdr32.e_shoff);
if (Verbose) printf(" e_flags = 0x%08x\n", ElfHeader.Ehdr32.e_flags);
if (Verbose) printf(" e_ehsize = %d\n", ElfHeader.Ehdr32.e_ehsize);
if (Verbose) printf(" e_phentsize = %d\n", ElfHeader.Ehdr32.e_phentsize);
Expand All @@ -1908,8 +1908,8 @@ void PrintElfHeader64(union Elf_Ehdr ElfHeader)
{
if (Verbose) printf(" e_version = %d\n", get_e_version(&ElfHeader));
if (Verbose) printf(" e_entry = 0x%lx\n", ElfHeader.Ehdr64.e_entry);
if (Verbose) printf(" e_phoff = 0x%08lx (%ld)\n", ElfHeader.Ehdr64.e_phoff, ElfHeader.Ehdr64.e_phoff);
if (Verbose) printf(" e_shoff = 0x%08lx (%ld)\n", ElfHeader.Ehdr64.e_shoff, ElfHeader.Ehdr64.e_shoff);
if (Verbose) printf(" e_phoff = 0x%08lx (%lu)\n", ElfHeader.Ehdr64.e_phoff, ElfHeader.Ehdr64.e_phoff);
if (Verbose) printf(" e_shoff = 0x%08lx (%lu)\n", ElfHeader.Ehdr64.e_shoff, ElfHeader.Ehdr64.e_shoff);
if (Verbose) printf(" e_flags = 0x%08x\n", ElfHeader.Ehdr64.e_flags);
if (Verbose) printf(" e_ehsize = %d\n", ElfHeader.Ehdr64.e_ehsize);
if (Verbose) printf(" e_phentsize = %d\n", ElfHeader.Ehdr64.e_phentsize);
Expand Down Expand Up @@ -2113,7 +2113,7 @@ int32 GetTblDefInfo(void)
SeekOffset = (uint32_t) (calculated_offset);
if (SeekOffset != calculated_offset)
{
printf("Error: SeekOffset may not be %ld\n", calculated_offset);
printf("Error: SeekOffset may not be %lu\n", calculated_offset);
Status = FAILED;
}
fseek(SrcFileDesc, SeekOffset, SEEK_SET);
Expand Down Expand Up @@ -2203,7 +2203,7 @@ int32 LocateAndReadUserObject(void)

if (Verbose)
{
printf("\ni = %d, NumSymbols = %ld\n", i, NumSymbols);
printf("\ni = %d, NumSymbols = %lu\n", i, NumSymbols);
if (i < NumSymbols)
{
printf("\nSymbolName = '%s', ObjectName = '%s'\n",SymbolNames[i], TblFileDef.ObjectName);
Expand Down Expand Up @@ -2248,7 +2248,7 @@ int32 LocateAndReadUserObject(void)
SeekOffset = (uint32_t) (calculated_offset);
if (SeekOffset != calculated_offset)
{
printf("Error: SeekOffset may not be %ld\n", calculated_offset);
printf("Error: SeekOffset may not be %lu\n", calculated_offset);
Status = FAILED;
}
fseek(SrcFileDesc, SeekOffset, SEEK_SET);
Expand Down
53 changes: 0 additions & 53 deletions for_build/Makefile

This file was deleted.

0 comments on commit be009b1

Please sign in to comment.