summaryrefslogtreecommitdiff
path: root/plugins/readelf/section.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/readelf/section.c')
-rw-r--r--plugins/readelf/section.c49
1 files changed, 16 insertions, 33 deletions
diff --git a/plugins/readelf/section.c b/plugins/readelf/section.c
index 815bac9..ed22069 100644
--- a/plugins/readelf/section.c
+++ b/plugins/readelf/section.c
@@ -60,7 +60,6 @@ static bool annotate_elf_section_header(GElfFormat *format, SourceEndian endian,
const char *secname; /* Nom d'une section analysée */
ImmOperandDisplay disp; /* Afficahge de valeur */
const char *text; /* Texte constant à insérer */
- vmpa2t start; /* Localisation des symboles */
GArchInstruction *instr; /* Instruction décodée */
GArchOperand *operand; /* Opérande à venir modifier */
GDbComment *comment; /* Définition de commentaire */
@@ -87,12 +86,11 @@ static bool annotate_elf_section_header(GElfFormat *format, SourceEndian endian,
dtext = stradd(dtext, "'");
}
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, endian);
SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, dtext);
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, dtext);
free(dtext);
@@ -214,12 +212,11 @@ static bool annotate_elf_section_header(GElfFormat *format, SourceEndian endian,
break;
}
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, endian);
SET_IMM_DISPLAY(instr, operand, 0, disp);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text);
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, text);
/* Champ "sh_flags"... */
@@ -269,123 +266,109 @@ static bool annotate_elf_section_header(GElfFormat *format, SourceEndian endian,
{
/* Champ "sh_flags" (suite) */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, endian);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, dtext);
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, dtext);
free(dtext);
/* Champ "sh_addr" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, endian);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Section virtual addr at execution"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Section virtual addr at execution"));
/* Champ "sh_offset" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, endian);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Section file offset"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Section file offset"));
/* Champ "sh_size" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, endian);
SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Section size in bytes"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Section size in bytes"));
}
else
{
/* Champ "sh_flags" (suite) */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_64_BITS, 1, pos, endian);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, dtext);
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, dtext);
free(dtext);
/* Champ "sh_addr" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_64_BITS, 1, pos, endian);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Section virtual addr at execution"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Section virtual addr at execution"));
/* Champ "sh_offset" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_64_BITS, 1, pos, endian);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Section file offset"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Section file offset"));
/* Champ "sh_size" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_64_BITS, 1, pos, endian);
SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Section size in bytes"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Section size in bytes"));
}
/* Champ "sh_link" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, endian);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Link to another section"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Link to another section"));
/* Champ "sh_info" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, endian);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Additional section information"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Additional section information"));
if (format->is_32b)
{
/* Champ "sh_addralign" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, endian);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Section alignment"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Section alignment"));
/* Champ "sh_entsize" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, pos, endian);
SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Entry size if section holds table"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Entry size if section holds table"));
}
else
{
/* Champ "sh_addralign" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_64_BITS, 1, pos, endian);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Section alignment"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Section alignment"));
/* Champ "sh_entsize" */
- copy_vmpa(&start, pos);
instr = g_raw_instruction_new_array(content, MDS_64_BITS, 1, pos, endian);
SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC);
- ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("Entry size if section holds table"));
+ ADD_RAW_AS_SYM(format, symbol, instr, comment, _("Entry size if section holds table"));
}