diff --git a/utils/sbtools/sb.h b/utils/sbtools/sb.h index fe9ee3f4db..9ffdba9191 100644 --- a/utils/sbtools/sb.h +++ b/utils/sbtools/sb.h @@ -123,6 +123,14 @@ struct sb_instruction_fill_t uint32_t pattern; } __attribute__((packed)); +struct sb_instruction_mode_t +{ + struct sb_instruction_header_t hdr; + uint32_t zero1; + uint32_t zero2; + uint32_t mode; +} __attribute__((packed)); + struct sb_instruction_call_t { struct sb_instruction_header_t hdr; diff --git a/utils/sbtools/sbtoelf.c b/utils/sbtools/sbtoelf.c index 854af2851e..7e6b77055b 100644 --- a/utils/sbtools/sbtoelf.c +++ b/utils/sbtools/sbtoelf.c @@ -307,6 +307,17 @@ static void extract_section(int data_sec, char name[5], byte *buf, int size, con // fixme: useless as pos is a multiple of 16 and call struct is 4-bytes wide ? pos = ROUND_UP(pos, 16); } + else if(hdr->opcode == SB_INST_MODE) + { + struct sb_instruction_mode_t *mode = (struct sb_instruction_mode_t *)hdr; + color(RED); + printf("MODE"); + color(OFF);printf(" | "); + color(BLUE); + printf("mod=0x%08x\n", mode->mode); + color(OFF); + pos += sizeof(struct sb_instruction_mode_t); + } else { color(RED); @@ -705,6 +716,7 @@ int main(int argc, const char **argv) { printf("Usage: %s []\n",*argv); printf("To use raw command mode, set environment variable SB_RAW_CMD to YES\n"); + printf("To ignore the file version check, set environment variable SB_IGNORE_VER to YES\n"); return 1; }