diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-12-13 11:40:53 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-12-13 11:40:53 (GMT) |
commit | 73d58a38c5847f54aa9458b3612ffd35b7372dc9 (patch) | |
tree | b1412630f4679cdf5c9e97943f0fb9645a426592 /plugins/mobicore | |
parent | 3754a5e3edeea98ce426b65772708ae91b291c1f (diff) |
Ensured all symbol comments match their symbol address.
Diffstat (limited to 'plugins/mobicore')
-rw-r--r-- | plugins/mobicore/annotations.c | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/plugins/mobicore/annotations.c b/plugins/mobicore/annotations.c index 0f91ffb..b53298e 100644 --- a/plugins/mobicore/annotations.c +++ b/plugins/mobicore/annotations.c @@ -81,7 +81,7 @@ static bool annotate_mclf_segment_descriptor(GMCLFFormat *format, const char *pr text = strdup(prefix); text = stradd(text, _(": start address")); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -92,7 +92,7 @@ static bool annotate_mclf_segment_descriptor(GMCLFFormat *format, const char *pr text = strdup(prefix); text = stradd(text, _(": length")); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -136,13 +136,13 @@ static bool annotate_mclf_intro(GMCLFFormat *format, vmpa2t *pos) SET_IMM_DISPLAY(instr, operand, 2, IOD_CHAR); SET_IMM_DISPLAY(instr, operand, 3, IOD_CHAR); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("MCLF magic number")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("MCLF magic number")); /* version */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Version")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Version")); return true; @@ -176,7 +176,7 @@ static bool annotate_mclf_header_v1(GMCLFFormat *format, vmpa2t *pos) instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Service flags")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Service flags")); /* mem_type */ @@ -198,7 +198,7 @@ static bool annotate_mclf_header_v1(GMCLFFormat *format, vmpa2t *pos) break; } - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); /* service_type */ @@ -223,13 +223,13 @@ static bool annotate_mclf_header_v1(GMCLFFormat *format, vmpa2t *pos) break; } - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); /* num_instances */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Number of instances which can be run simultaneously")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Number of instances which can be run simultaneously")); /* uuid */ @@ -237,7 +237,7 @@ static bool annotate_mclf_header_v1(GMCLFFormat *format, vmpa2t *pos) g_raw_instruction_mark_as_padding(G_RAW_INSTRUCTION(instr), true); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Loadable service unique identifier (UUID)")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Loadable service unique identifier (UUID)")); /* driver_id */ @@ -248,49 +248,49 @@ static bool annotate_mclf_header_v1(GMCLFFormat *format, vmpa2t *pos) else text = _("Unused Driver ID"); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Number of threads")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Number of threads")); /* num_threads */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Number of threads")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Number of threads")); /* text.start */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Virtual text segment: start address")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Virtual text segment: start address")); /* text.len */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Virtual text segment: length")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Virtual text segment: length")); /* data.start */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Virtual data segment: start address")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Virtual data segment: start address")); /* data.len */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Virtual data segment: length")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Virtual data segment: length")); /* bss_len */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Length of the BSS segment in bytes")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Length of the BSS segment in bytes")); /* entry */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Virtual start address of service code")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Virtual start address of service code")); @@ -300,7 +300,7 @@ static bool annotate_mclf_header_v1(GMCLFFormat *format, vmpa2t *pos) instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Version of the interface the driver exports")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Version of the interface the driver exports")); @@ -309,19 +309,19 @@ static bool annotate_mclf_header_v1(GMCLFFormat *format, vmpa2t *pos) instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Silicon Provider ID")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Silicon Provider ID")); /* sip_data */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 3, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Platform specific device identifier")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Platform specific device identifier")); /* permitted_hw_cfg */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Configuration which is allowed to execute binary")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Configuration which is allowed to execute binary")); return true; @@ -365,37 +365,35 @@ static bool annotate_mclf_text_segment_header(GMCLFFormat *format, vmpa2t *pos) diff = compute_vmpa_diff(&old, pos); - printf("DIFF : %u\n", (unsigned int)diff); - instr = g_raw_instruction_new_array(content, MDS_8_BITS, diff, &old, format->endian); g_raw_instruction_mark_as_padding(G_RAW_INSTRUCTION(instr), true); - ADD_RAW_AS_SYM(format, symbol, &old, instr, comment, _("Padding")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Padding")); /* version */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Version of the TextHeader structure")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Version of the TextHeader structure")); /* text_header_len */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Size of this structure")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Size of this structure")); /* required_feat */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Features that Mobicore must understand when loading")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Features that Mobicore must understand when loading")); /* mc_lib_entry */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Address for McLib entry")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Address for McLib entry")); /* mc_lib_data */ @@ -408,25 +406,25 @@ static bool annotate_mclf_text_segment_header(GMCLFFormat *format, vmpa2t *pos) instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("McLib base address")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("McLib base address")); /* tl_api_vers */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("TlApi version used when building trustlet")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("TlApi version used when building trustlet")); /* dr_api_vers */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("DrApi version used when building trustlet")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("DrApi version used when building trustlet")); /* ta_properties */ instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, format->endian); - ADD_RAW_AS_SYM(format, symbol, pos, instr, comment, _("Address of _TA_Properties in the TA")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Address of _TA_Properties in the TA")); return true; |