summaryrefslogtreecommitdiff
path: root/common_modules/module_manager/utilities/module_to_binary.c
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-03-06 19:27:49 +0100
committerGitHub <[email protected]>2026-03-06 19:27:49 +0100
commit3726d7906b4808bfec7855fc088e073199df9120 (patch)
tree8789bfd03d1d49e1967e80d04aa4ff606fda43eb /common_modules/module_manager/utilities/module_to_binary.c
parent4b6e8100d932a3a67b34c6eb17f84f3bffb9e2ae (diff)
parentc3259a216026372e3833dd8996a68f77e8595fbd (diff)
Merge pull request #510 from eclipse-threadx/devv6.5.0.202601_rel
Merge changes ahead of the v6.5.0.202601 release
Diffstat (limited to 'common_modules/module_manager/utilities/module_to_binary.c')
-rw-r--r--common_modules/module_manager/utilities/module_to_binary.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/common_modules/module_manager/utilities/module_to_binary.c b/common_modules/module_manager/utilities/module_to_binary.c
index 77517e0d..a749c8a3 100644
--- a/common_modules/module_manager/utilities/module_to_binary.c
+++ b/common_modules/module_manager/utilities/module_to_binary.c
@@ -14,7 +14,7 @@ FILE *binary_file;
#define ELF_EXECUTABLE 2
-typedef struct ELF_HEADER_STRUCT
+typedef struct ELF_HEADER_STRUCT
{
unsigned char elf_header_id_string[ELF_ID_STRING_SIZE];
unsigned short elf_header_file_type;
@@ -114,12 +114,12 @@ unsigned char *buffer;
for (i = 0; i < object_size; i++)
{
alpha = fgetc(source_file);
-
+
if (alpha == EOF)
return(1);
-
+
buffer[i] = (unsigned char) alpha;
- }
+ }
/* Return success. */
return(0);
@@ -140,7 +140,7 @@ unsigned char zero_value;
/* Determine if the proper number of files are provided. */
- if (argc != 3)
+ if (argc != 3)
{
/* Print an error message out and wait for user key hit. */
@@ -163,7 +163,7 @@ unsigned char zero_value;
printf(" File: %s ", argv[1]);
return(2);
}
-
+
/* Attempt to open the binary file for writing. */
binary_file = fopen(argv[2], "wb");
@@ -182,7 +182,7 @@ unsigned char zero_value;
/* Allocate memory for the program header(s). */
program_header = malloc(sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries);
-
+
/* Read the program header(s). */
elf_object_read(header.elf_header_program_header_offset, program_header, (sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries));
@@ -194,7 +194,7 @@ unsigned char zero_value;
/* Alocate memory for the section string table. */
- section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size);
+ section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size);
/* Read the section string table. */
elf_object_read(section_header[header.elf_header_section_string_index].elf_section_header_offset, section_string_table, section_header[header.elf_header_section_string_index].elf_section_header_size);
@@ -315,7 +315,7 @@ unsigned char zero_value;
/* Move address forward. */
address++;
-
+
/* Decrement size. */
size--;