summaryrefslogtreecommitdiff
path: root/utils/sbtools/sbtoelf.c
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-07-22 15:45:08 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-07-22 15:45:08 +0000
commit56bc02c7a22fe20f66d30ba5befdfb0f7856e095 (patch)
tree7f29d9b439947b2a2ff9db67bd8aff6634091b9a /utils/sbtools/sbtoelf.c
parent146e2eb089eb7e94e868834b3eaa5e396ee2d2bb (diff)
downloadrockbox-56bc02c7a22fe20f66d30ba5befdfb0f7856e095.tar.gz
rockbox-56bc02c7a22fe20f66d30ba5befdfb0f7856e095.zip
sbtools: add missing cariage return, implement boot mode command, add C++ style comments support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30192 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/sbtools/sbtoelf.c')
-rw-r--r--utils/sbtools/sbtoelf.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/utils/sbtools/sbtoelf.c b/utils/sbtools/sbtoelf.c
index 851189f05e..f421f83848 100644
--- a/utils/sbtools/sbtoelf.c
+++ b/utils/sbtools/sbtoelf.c
@@ -224,7 +224,15 @@ static void extract_section(int data_sec, char name[5], byte *buf, int size, con
224 color(GREY); 224 color(GREY);
225 printf("[Bad checksum]"); 225 printf("[Bad checksum]");
226 } 226 }
227 227 if(hdr->flags != 0)
228 {
229 color(GREY);
230 printf("[");
231 color(BLUE);
232 printf("f=%x", hdr->flags);
233 color(GREY);
234 printf("] ");
235 }
228 if(hdr->opcode == SB_INST_LOAD) 236 if(hdr->opcode == SB_INST_LOAD)
229 { 237 {
230 struct sb_instruction_load_t *load = (struct sb_instruction_load_t *)&buf[pos]; 238 struct sb_instruction_load_t *load = (struct sb_instruction_load_t *)&buf[pos];
@@ -612,8 +620,16 @@ static void extract(unsigned long filesize)
612 printf("cnt=0x%08x", tag->len); 620 printf("cnt=0x%08x", tag->len);
613 color(OFF);printf(" | "); 621 color(OFF);printf(" | ");
614 color(YELLOW); 622 color(YELLOW);
615 printf("flg=0x%08x\n", tag->flags); 623 printf("flg=0x%08x", tag->flags);
616 color(OFF); 624 color(OFF);
625 if(tag->hdr.flags & SB_INST_LAST_TAG)
626 {
627 printf(" | ");
628 color(RED);
629 printf(" Last section");
630 color(OFF);
631 }
632 printf("\n");
617 offset += sizeof(struct sb_instruction_tag_t); 633 offset += sizeof(struct sb_instruction_tag_t);
618 634
619 char name[5]; 635 char name[5];