diff --git a/README.md b/README.md index 8cab764..fcafa5e 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,31 @@ This lab application is a ground utility to convert ELF to cFE binary tables for See README.txt for more information. -## Version Notes - -- 3.1.2: - - Minor bug fixes and documentation (see https://github.com/nasa/elf2cfetbl/pull/25) -- 3.1.1: - - Minor updates (see https://github.com/nasa/elf2cfetbl/pull/19) -- **3.1.0 OFFICIAL RELEASE**: - - Minor updates (see https://github.com/nasa/elf2cfetbl/pull/13) - - Not backwards compatible with OSAL 4.2.1 - - Released as part of cFE 6.7.0, Apache 2.0 -- **3.0a OFFICIAL RELEASE**: - - Released as part of cFE 6.6.0a, Apache 2.0 +## Version History + +#### Development Build: 3.1.3 + +- Builds for vxworks w/ 32-bit host +- See https://github.com/nasa/elf2cfetbl/pull/40 + +#### Development Build: 3.1.2 + +- Minor bug fixes and documentation (see https://github.com/nasa/elf2cfetbl/pull/25) + +#### Development Build: 3.1.1 + +- Minor updates (see https://github.com/nasa/elf2cfetbl/pull/19) + + +### ***OFFICIAL RELEASE: 3.1.0*** + +- Minor updates (see https://github.com/nasa/elf2cfetbl/pull/13) +- Not backwards compatible with OSAL 4.2.1 +- Released as part of cFE 6.7.0, Apache 2.0 + +### ***OFFICIAL RELEASE: 3.0a*** + +- Released as part of cFE 6.6.0a, Apache 2.0 NOTE - there are other parameter set management schemes used with the cFS (JSON, csv, etc) which may be more applicable for modern missions. Contact the community as detailed below for more information. diff --git a/elf2cfetbl.c b/elf2cfetbl.c index d1a3f01..d17285c 100644 --- a/elf2cfetbl.c +++ b/elf2cfetbl.c @@ -589,7 +589,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 %lu\n", new_value); + printf("ERROR: Sym32.st_size can not hold %lu\n", (long unsigned int)new_value); } } else @@ -1259,7 +1259,7 @@ int32 ProcessCmdLineOptions(int ArgumentCount, char *Arguments[]) void OutputVersionInfo(void) { printf("\nElf Object File to cFE Table Image File Conversion Tool\n"); - printf(" Version v3.1.2\n"); + printf(" Version v3.1.3\n"); printf(" Built - %s %s\n\n", __DATE__, __TIME__); } @@ -1695,7 +1695,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 = %lu", NumSymbols); + sprintf(VerboseStr, "SHT_SYMTAB (2) - # Symbols = %lu", (long unsigned int)NumSymbols); break; case SHT_STRTAB: @@ -1794,7 +1794,7 @@ int32 GetSymbol(int32 SymbolIndex, union Elf_Sym *Symbol) int32 i=0; if (SeekOffset != calculated_offset) { - printf("Error: SeekOffset may not be %lu\n", calculated_offset); + printf("Error: SeekOffset may not be %lu\n", (long unsigned int)calculated_offset); Status = FAILED; } else @@ -1875,8 +1875,8 @@ void PrintSymbol32(union Elf_Sym *Symbol) void PrintSymbol64(union Elf_Sym *Symbol) { - if (Verbose) printf(" st_value = 0x%lx\n", Symbol->Sym64.st_value); - if (Verbose) printf(" st_size = 0x%08lx\n", Symbol->Sym64.st_size); + if (Verbose) printf(" st_value = 0x%lx\n", (long unsigned int)Symbol->Sym64.st_value); + if (Verbose) printf(" st_size = 0x%08lx\n", (long unsigned int)Symbol->Sym64.st_size); if (Verbose) printf(" st_info = 0x%02x\n", Symbol->Sym64.st_info); if (Verbose) printf(" st_other = 0x%02x\n", Symbol->Sym64.st_other); if (Verbose) printf(" st_shndx = 0x%04x\n", Symbol->Sym64.st_shndx); @@ -1895,13 +1895,13 @@ void PrintSectionHeader32(union Elf_Shdr *SectionHeader) void PrintSectionHeader64(union Elf_Shdr *SectionHeader) { - if (Verbose) printf(" sh_addr = 0x%lx\n", SectionHeader->Shdr64.sh_addr); - if (Verbose) printf(" sh_offset = 0x%08lx\n", SectionHeader->Shdr64.sh_offset); - if (Verbose) printf(" sh_size = 0x%08lx\n", SectionHeader->Shdr64.sh_size); + if (Verbose) printf(" sh_addr = 0x%lx\n", (long unsigned int)SectionHeader->Shdr64.sh_addr); + if (Verbose) printf(" sh_offset = 0x%08lx\n", (long unsigned int)SectionHeader->Shdr64.sh_offset); + if (Verbose) printf(" sh_size = 0x%08lx\n", (long unsigned int)SectionHeader->Shdr64.sh_size); if (Verbose) printf(" sh_link = 0x%08x\n", SectionHeader->Shdr64.sh_link); if (Verbose) printf(" sh_info = 0x%08x\n", SectionHeader->Shdr64.sh_info); - if (Verbose) printf(" sh_addralign = 0x%08lx\n", SectionHeader->Shdr64.sh_addralign); - if (Verbose) printf(" sh_entsize = 0x%08lx\n", SectionHeader->Shdr64.sh_entsize); + if (Verbose) printf(" sh_addralign = 0x%08lx\n", (long unsigned int)SectionHeader->Shdr64.sh_addralign); + if (Verbose) printf(" sh_entsize = 0x%08lx\n", (long unsigned int)SectionHeader->Shdr64.sh_entsize); } void PrintElfHeader32(union Elf_Ehdr ElfHeader) @@ -1922,9 +1922,9 @@ void PrintElfHeader32(union Elf_Ehdr ElfHeader) 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 (%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_entry = 0x%lx\n", (long unsigned int)ElfHeader.Ehdr64.e_entry); + if (Verbose) printf(" e_phoff = 0x%08lx (%lu)\n", (long unsigned int)ElfHeader.Ehdr64.e_phoff, (long unsigned int)ElfHeader.Ehdr64.e_phoff); + if (Verbose) printf(" e_shoff = 0x%08lx (%lu)\n", (long unsigned int)ElfHeader.Ehdr64.e_shoff, (long unsigned int)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); @@ -2117,8 +2117,8 @@ int32 GetTblDefInfo(void) /* Read the data to be used to format the CFE File and Table Headers */ if ((get_st_size(SymbolPtrs[TblDefSymbolIndex]) != sizeof(CFE_TBL_FileDef_t)) && (get_st_size(SymbolPtrs[TblDefSymbolIndex]) != 0)) { - printf("Error! '%s' is not properly defined in '%s'. Size of object is incorrect (%ld).\n", - TBL_DEF_SYMBOL_NAME, SrcFilename, get_st_size(SymbolPtrs[TblDefSymbolIndex])); + printf("Error! '%s' is not properly defined in '%s'. Size of object is incorrect (%lu).\n", + TBL_DEF_SYMBOL_NAME, SrcFilename, (long unsigned int)get_st_size(SymbolPtrs[TblDefSymbolIndex])); Status = FAILED; } else @@ -2128,7 +2128,7 @@ int32 GetTblDefInfo(void) SeekOffset = (uint32_t) (calculated_offset); if (SeekOffset != calculated_offset) { - printf("Error: SeekOffset may not be %lu\n", calculated_offset); + printf("Error: SeekOffset may not be %lu\n", (long unsigned int)calculated_offset); Status = FAILED; } fseek(SrcFileDesc, SeekOffset, SEEK_SET); @@ -2179,7 +2179,7 @@ int32 LocateAndReadUserObject(void) uint8 AByte; /* Search the symbol table for the user defined object */ - if (Verbose) printf("\nTrying to match ObjectName '%s'... (length %ld)",TblFileDef.ObjectName,strlen(TblFileDef.ObjectName)); + if (Verbose) printf("\nTrying to match ObjectName '%s'... (length %lu)",TblFileDef.ObjectName,(long unsigned int)strlen(TblFileDef.ObjectName)); while (i