diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2013-06-15 22:19:52 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2013-06-15 22:27:34 +0200 |
commit | 7c7fa369186536adaf9ff35ec356525b5c5a8379 (patch) | |
tree | bc70e26ffcc48a7d0a0a40e7c33e0cd48bd265fa /utils/imxtools/sbtools/elf.c | |
parent | 58e27b9fa1e9ea058eb5161f140e0909c4821c92 (diff) | |
download | rockbox-7c7fa369186536adaf9ff35ec356525b5c5a8379.tar.gz rockbox-7c7fa369186536adaf9ff35ec356525b5c5a8379.zip |
sbtools,mkximboot: fix whitespace
Change-Id: I8d8adb783707172d1aaef302366c240310350ed8
Diffstat (limited to 'utils/imxtools/sbtools/elf.c')
-rw-r--r-- | utils/imxtools/sbtools/elf.c | 20 |
1 files changed, 10 insertions, 10 deletions
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, | |||
208 | printf("oops, non-zero filling, ignore fill section\n"); | 208 | printf("oops, non-zero filling, ignore fill section\n"); |
209 | return; | 209 | return; |
210 | } | 210 | } |
211 | 211 | ||
212 | struct elf_section_t *sec = elf_add_section(params); | 212 | struct elf_section_t *sec = elf_add_section(params); |
213 | 213 | ||
214 | sec->type = EST_FILL; | 214 | sec->type = EST_FILL; |
215 | sec->addr = fill_addr; | 215 | sec->addr = fill_addr; |
216 | sec->size = size; | 216 | sec->size = size; |
@@ -239,7 +239,7 @@ void elf_simplify(struct elf_params_t *params) | |||
239 | nr_sections++; | 239 | nr_sections++; |
240 | cur_sec = cur_sec->next; | 240 | cur_sec = cur_sec->next; |
241 | } | 241 | } |
242 | 242 | ||
243 | /* put all sections in an array and free list */ | 243 | /* put all sections in an array and free list */ |
244 | struct elf_section_t *sections = malloc(sizeof(struct elf_section_t) * nr_sections); | 244 | struct elf_section_t *sections = malloc(sizeof(struct elf_section_t) * nr_sections); |
245 | cur_sec = params->first_section; | 245 | cur_sec = params->first_section; |
@@ -371,7 +371,7 @@ void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, | |||
371 | elf_printf_fn_t printf, void *user) | 371 | elf_printf_fn_t printf, void *user) |
372 | { | 372 | { |
373 | (void) printf; | 373 | (void) printf; |
374 | 374 | ||
375 | Elf32_Ehdr ehdr; | 375 | Elf32_Ehdr ehdr; |
376 | uint32_t phnum = 0; | 376 | uint32_t phnum = 0; |
377 | struct elf_section_t *sec = params->first_section; | 377 | 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, | |||
391 | { | 391 | { |
392 | sec->offset = 0; | 392 | sec->offset = 0; |
393 | } | 393 | } |
394 | 394 | ||
395 | phnum++; | 395 | phnum++; |
396 | sec = sec->next; | 396 | sec = sec->next; |
397 | } | 397 | } |
@@ -431,7 +431,7 @@ void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, | |||
431 | * - one name ".shstrtab\0" */ | 431 | * - one name ".shstrtab\0" */ |
432 | char *strtbl_content = malloc(1 + strlen(".shstrtab") + 1 + | 432 | char *strtbl_content = malloc(1 + strlen(".shstrtab") + 1 + |
433 | phnum * (strlen(".textXXXX") + 1)); | 433 | phnum * (strlen(".textXXXX") + 1)); |
434 | 434 | ||
435 | strtbl_content[0] = '\0'; | 435 | strtbl_content[0] = '\0'; |
436 | strcpy(&strtbl_content[1], ".shstrtab"); | 436 | strcpy(&strtbl_content[1], ".shstrtab"); |
437 | uint32_t strtbl_index = 1 + strlen(".shstrtab") + 1; | 437 | 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, | |||
444 | while(sec) | 444 | while(sec) |
445 | { | 445 | { |
446 | sec->offset += data_offset; | 446 | sec->offset += data_offset; |
447 | 447 | ||
448 | phdr.p_type = PT_LOAD; | 448 | phdr.p_type = PT_LOAD; |
449 | if(sec->type == EST_LOAD) | 449 | if(sec->type == EST_LOAD) |
450 | phdr.p_offset = sec->offset; | 450 | phdr.p_offset = sec->offset; |
@@ -549,7 +549,7 @@ bool elf_read_file(struct elf_params_t *params, elf_read_fn_t read, | |||
549 | elf_printf_fn_t printf, void *user) | 549 | elf_printf_fn_t printf, void *user) |
550 | { | 550 | { |
551 | #define error_printf(...) ({printf(user, true, __VA_ARGS__); return false;}) | 551 | #define error_printf(...) ({printf(user, true, __VA_ARGS__); return false;}) |
552 | 552 | ||
553 | /* read header */ | 553 | /* read header */ |
554 | Elf32_Ehdr ehdr; | 554 | Elf32_Ehdr ehdr; |
555 | if(!read(user, 0, &ehdr, sizeof(ehdr))) | 555 | 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, | |||
626 | if(strtab) | 626 | if(strtab) |
627 | printf(user, false, "filter out %s\n", &strtab[shdr.sh_name], shdr.sh_type); | 627 | printf(user, false, "filter out %s\n", &strtab[shdr.sh_name], shdr.sh_type); |
628 | } | 628 | } |
629 | 629 | ||
630 | } | 630 | } |
631 | free(strtab); | 631 | free(strtab); |
632 | /* run through segments */ | 632 | /* run through segments */ |
@@ -647,7 +647,7 @@ bool elf_read_file(struct elf_params_t *params, elf_read_fn_t read, | |||
647 | printf(user, false, "create segment [%#x,+%#x[ -> [%#x,+%#x[\n", | 647 | printf(user, false, "create segment [%#x,+%#x[ -> [%#x,+%#x[\n", |
648 | seg->vaddr, seg->vsize, seg->paddr, seg->psize); | 648 | seg->vaddr, seg->vsize, seg->paddr, seg->psize); |
649 | } | 649 | } |
650 | 650 | ||
651 | return true; | 651 | return true; |
652 | } | 652 | } |
653 | 653 | ||