From 7c7fa369186536adaf9ff35ec356525b5c5a8379 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sat, 15 Jun 2013 22:19:52 +0200 Subject: sbtools,mkximboot: fix whitespace Change-Id: I8d8adb783707172d1aaef302366c240310350ed8 --- utils/imxtools/sbtools/elf.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'utils/imxtools/sbtools/elf.c') diff --git a/utils/imxtools/sbtools/elf.c b/utils/imxtools/sbtools/elf.c index c41fc27fdd..5626c0f58c 100644 --- a/utils/imxtools/sbtools/elf.c +++ b/utils/imxtools/sbtools/elf.c @@ -208,9 +208,9 @@ void elf_add_fill_section(struct elf_params_t *params, printf("oops, non-zero filling, ignore fill section\n"); return; } - + struct elf_section_t *sec = elf_add_section(params); - + sec->type = EST_FILL; sec->addr = fill_addr; sec->size = size; @@ -239,7 +239,7 @@ void elf_simplify(struct elf_params_t *params) nr_sections++; cur_sec = cur_sec->next; } - + /* put all sections in an array and free list */ struct elf_section_t *sections = malloc(sizeof(struct elf_section_t) * nr_sections); cur_sec = params->first_section; @@ -371,7 +371,7 @@ void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, elf_printf_fn_t printf, void *user) { (void) printf; - + Elf32_Ehdr ehdr; uint32_t phnum = 0; struct elf_section_t *sec = params->first_section; @@ -391,7 +391,7 @@ void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, { sec->offset = 0; } - + phnum++; sec = sec->next; } @@ -431,7 +431,7 @@ void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, * - one name ".shstrtab\0" */ char *strtbl_content = malloc(1 + strlen(".shstrtab") + 1 + phnum * (strlen(".textXXXX") + 1)); - + strtbl_content[0] = '\0'; strcpy(&strtbl_content[1], ".shstrtab"); uint32_t strtbl_index = 1 + strlen(".shstrtab") + 1; @@ -444,7 +444,7 @@ void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, while(sec) { sec->offset += data_offset; - + phdr.p_type = PT_LOAD; if(sec->type == EST_LOAD) phdr.p_offset = sec->offset; @@ -549,7 +549,7 @@ bool elf_read_file(struct elf_params_t *params, elf_read_fn_t read, elf_printf_fn_t printf, void *user) { #define error_printf(...) ({printf(user, true, __VA_ARGS__); return false;}) - + /* read header */ Elf32_Ehdr ehdr; if(!read(user, 0, &ehdr, sizeof(ehdr))) @@ -626,7 +626,7 @@ bool elf_read_file(struct elf_params_t *params, elf_read_fn_t read, if(strtab) printf(user, false, "filter out %s\n", &strtab[shdr.sh_name], shdr.sh_type); } - + } free(strtab); /* run through segments */ @@ -647,7 +647,7 @@ bool elf_read_file(struct elf_params_t *params, elf_read_fn_t read, printf(user, false, "create segment [%#x,+%#x[ -> [%#x,+%#x[\n", seg->vaddr, seg->vsize, seg->paddr, seg->psize); } - + return true; } -- cgit v1.2.3