diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-02-10 12:09:38 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-02-10 12:09:38 (GMT) |
commit | dbd5e7fdfd43fba609fce3fafdcd38d704554d99 (patch) | |
tree | 5811a602d34993598eeea5ea56b1efc3b93f9c63 /src/arch | |
parent | 465488d5b231c2552116a305c48b5fcccea55a09 (diff) |
Included indications to load the proper pool constants in Dalvik operands.
Diffstat (limited to 'src/arch')
50 files changed, 92 insertions, 48 deletions
diff --git a/src/arch/dalvik/Makefile.am b/src/arch/dalvik/Makefile.am index 0f04dae..6ccbb5d 100644 --- a/src/arch/dalvik/Makefile.am +++ b/src/arch/dalvik/Makefile.am @@ -3,6 +3,7 @@ noinst_LTLIBRARIES = libarchdalvik.la libarchdalvik_la_SOURCES = \ context.h context.c \ + helpers.h \ instruction-def.h \ instruction-int.h \ instruction.h instruction.c \ diff --git a/src/arch/dalvik/helpers.h b/src/arch/dalvik/helpers.h new file mode 100644 index 0000000..1b57d00 --- /dev/null +++ b/src/arch/dalvik/helpers.h @@ -0,0 +1,43 @@ + +/* Chrysalide - Outil d'analyse de fichiers binaires + * helpers.h - prototypes pour l'aide à la mise en place des opérandes Dalvik + * + * Copyright (C) 2016 Cyrille Bagard + * + * This file is part of Chrysalide. + * + * OpenIDA is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * OpenIDA is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <http://www.gnu.org/licenses/>. + */ + + +#ifndef _ARCH_DALVIK_HELPERS_H +#define _ARCH_DALVIK_HELPERS_H + + +#include "operand.h" + + + +/** + * Glues purement internes. + */ + +#define DALVIK_OPT_POOL_STRING DALVIK_OP_POOL(DPT_STRING) +#define DALVIK_OPT_POOL_TYPE DALVIK_OP_POOL(DPT_TYPE) +#define DALVIK_OPT_POOL_FIELD DALVIK_OP_POOL(DPT_FIELD) +#define DALVIK_OPT_POOL_METH DALVIK_OP_POOL(DPT_METHOD) + + + +#endif /* _ARCH_DALVIK_HELPERS_H */ diff --git a/src/arch/dalvik/opdefs/Makefile.am b/src/arch/dalvik/opdefs/Makefile.am index 115f75c..eebf04e 100644 --- a/src/arch/dalvik/opdefs/Makefile.am +++ b/src/arch/dalvik/opdefs/Makefile.am @@ -19,8 +19,8 @@ D2C_ENCODINGS = \ FIXED_C_INCLUDES = \ \n\#include \<stdint.h\> \ \n \ + \n\#include \"..\/helpers.h\" \ \n\#include \"..\/instruction.h\" \ - \n\#include \"..\/operand.h\" \ \n\#include \"..\/processor.h\" \ \n\#include \"..\/..\/context.h\" \ \n\#include \"..\/..\/..\/analysis\/content.h\" \ diff --git a/src/arch/dalvik/opdefs/array_24.d b/src/arch/dalvik/opdefs/array_24.d index b7dc4d4..00b7896 100644 --- a/src/arch/dalvik/opdefs/array_24.d +++ b/src/arch/dalvik/opdefs/array_24.d @@ -25,6 +25,6 @@ @encoding() { - @format 35c + @format 35c | pool_type } diff --git a/src/arch/dalvik/opdefs/check_1f.d b/src/arch/dalvik/opdefs/check_1f.d index 7de7e56..0f59ba7 100644 --- a/src/arch/dalvik/opdefs/check_1f.d +++ b/src/arch/dalvik/opdefs/check_1f.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_type } diff --git a/src/arch/dalvik/opdefs/const_1a.d b/src/arch/dalvik/opdefs/const_1a.d index c6d3f62..22c11ae 100644 --- a/src/arch/dalvik/opdefs/const_1a.d +++ b/src/arch/dalvik/opdefs/const_1a.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_string } diff --git a/src/arch/dalvik/opdefs/const_1b.d b/src/arch/dalvik/opdefs/const_1b.d index e7c97e1..699cef6 100644 --- a/src/arch/dalvik/opdefs/const_1b.d +++ b/src/arch/dalvik/opdefs/const_1b.d @@ -25,6 +25,6 @@ @encoding() { - @format 31c + @format 31c | pool_string } diff --git a/src/arch/dalvik/opdefs/const_1c.d b/src/arch/dalvik/opdefs/const_1c.d index 623fca0..c539ee9 100644 --- a/src/arch/dalvik/opdefs/const_1c.d +++ b/src/arch/dalvik/opdefs/const_1c.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_type } diff --git a/src/arch/dalvik/opdefs/filled_25.d b/src/arch/dalvik/opdefs/filled_25.d index 7bb4088..cf31e09 100644 --- a/src/arch/dalvik/opdefs/filled_25.d +++ b/src/arch/dalvik/opdefs/filled_25.d @@ -25,6 +25,6 @@ @encoding() { - @format 3rc + @format 3rc | pool_type } diff --git a/src/arch/dalvik/opdefs/iget_52.d b/src/arch/dalvik/opdefs/iget_52.d index 6217ddb..ca5c140 100644 --- a/src/arch/dalvik/opdefs/iget_52.d +++ b/src/arch/dalvik/opdefs/iget_52.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iget_53.d b/src/arch/dalvik/opdefs/iget_53.d index adf089e..3d458d9 100644 --- a/src/arch/dalvik/opdefs/iget_53.d +++ b/src/arch/dalvik/opdefs/iget_53.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iget_54.d b/src/arch/dalvik/opdefs/iget_54.d index 45bc02c..343accc 100644 --- a/src/arch/dalvik/opdefs/iget_54.d +++ b/src/arch/dalvik/opdefs/iget_54.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iget_55.d b/src/arch/dalvik/opdefs/iget_55.d index d5a37bc..dc9d7a4 100644 --- a/src/arch/dalvik/opdefs/iget_55.d +++ b/src/arch/dalvik/opdefs/iget_55.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iget_56.d b/src/arch/dalvik/opdefs/iget_56.d index 5bffd30..92e4d6c 100644 --- a/src/arch/dalvik/opdefs/iget_56.d +++ b/src/arch/dalvik/opdefs/iget_56.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iget_57.d b/src/arch/dalvik/opdefs/iget_57.d index 43ba4b6..b8864c7 100644 --- a/src/arch/dalvik/opdefs/iget_57.d +++ b/src/arch/dalvik/opdefs/iget_57.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iget_58.d b/src/arch/dalvik/opdefs/iget_58.d index aba5271..85a3fb8 100644 --- a/src/arch/dalvik/opdefs/iget_58.d +++ b/src/arch/dalvik/opdefs/iget_58.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/instanceof_20.d b/src/arch/dalvik/opdefs/instanceof_20.d index 82136a2..7652c56 100644 --- a/src/arch/dalvik/opdefs/instanceof_20.d +++ b/src/arch/dalvik/opdefs/instanceof_20.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_type } diff --git a/src/arch/dalvik/opdefs/invoke_6e.d b/src/arch/dalvik/opdefs/invoke_6e.d index e9a679b..e7b3f0d 100644 --- a/src/arch/dalvik/opdefs/invoke_6e.d +++ b/src/arch/dalvik/opdefs/invoke_6e.d @@ -25,6 +25,6 @@ @encoding() { - @format 35c + @format 35c | pool_meth } diff --git a/src/arch/dalvik/opdefs/invoke_6f.d b/src/arch/dalvik/opdefs/invoke_6f.d index 80834e2..9fa4666 100644 --- a/src/arch/dalvik/opdefs/invoke_6f.d +++ b/src/arch/dalvik/opdefs/invoke_6f.d @@ -25,6 +25,6 @@ @encoding() { - @format 35c + @format 35c | pool_meth } diff --git a/src/arch/dalvik/opdefs/invoke_70.d b/src/arch/dalvik/opdefs/invoke_70.d index 0624fa3..6662ce3 100644 --- a/src/arch/dalvik/opdefs/invoke_70.d +++ b/src/arch/dalvik/opdefs/invoke_70.d @@ -25,6 +25,6 @@ @encoding() { - @format 35c + @format 35c | pool_meth } diff --git a/src/arch/dalvik/opdefs/invoke_71.d b/src/arch/dalvik/opdefs/invoke_71.d index 7088d9f..f179dbd 100644 --- a/src/arch/dalvik/opdefs/invoke_71.d +++ b/src/arch/dalvik/opdefs/invoke_71.d @@ -25,6 +25,6 @@ @encoding() { - @format 35c + @format 35c | pool_meth } diff --git a/src/arch/dalvik/opdefs/invoke_72.d b/src/arch/dalvik/opdefs/invoke_72.d index fc15dd6..6ad8e09 100644 --- a/src/arch/dalvik/opdefs/invoke_72.d +++ b/src/arch/dalvik/opdefs/invoke_72.d @@ -25,6 +25,6 @@ @encoding() { - @format 35c + @format 35c | pool_meth } diff --git a/src/arch/dalvik/opdefs/invoke_74.d b/src/arch/dalvik/opdefs/invoke_74.d index 0703ea7..77b68de 100644 --- a/src/arch/dalvik/opdefs/invoke_74.d +++ b/src/arch/dalvik/opdefs/invoke_74.d @@ -25,6 +25,6 @@ @encoding() { - @format 3rc + @format 3rc | pool_meth } diff --git a/src/arch/dalvik/opdefs/invoke_75.d b/src/arch/dalvik/opdefs/invoke_75.d index 351ccc7..e886dad 100644 --- a/src/arch/dalvik/opdefs/invoke_75.d +++ b/src/arch/dalvik/opdefs/invoke_75.d @@ -25,6 +25,6 @@ @encoding() { - @format 3rc + @format 3rc | pool_meth } diff --git a/src/arch/dalvik/opdefs/invoke_76.d b/src/arch/dalvik/opdefs/invoke_76.d index cf00220..8156689 100644 --- a/src/arch/dalvik/opdefs/invoke_76.d +++ b/src/arch/dalvik/opdefs/invoke_76.d @@ -25,6 +25,6 @@ @encoding() { - @format 3rc + @format 3rc | pool_meth } diff --git a/src/arch/dalvik/opdefs/invoke_77.d b/src/arch/dalvik/opdefs/invoke_77.d index 76aa1d0..b5707e2 100644 --- a/src/arch/dalvik/opdefs/invoke_77.d +++ b/src/arch/dalvik/opdefs/invoke_77.d @@ -25,6 +25,6 @@ @encoding() { - @format 3rc + @format 3rc | pool_meth } diff --git a/src/arch/dalvik/opdefs/invoke_78.d b/src/arch/dalvik/opdefs/invoke_78.d index fd4d1ee..5589b38 100644 --- a/src/arch/dalvik/opdefs/invoke_78.d +++ b/src/arch/dalvik/opdefs/invoke_78.d @@ -25,6 +25,6 @@ @encoding() { - @format 3rc + @format 3rc | pool_meth } diff --git a/src/arch/dalvik/opdefs/iput_59.d b/src/arch/dalvik/opdefs/iput_59.d index d4058c3..fd17db4 100644 --- a/src/arch/dalvik/opdefs/iput_59.d +++ b/src/arch/dalvik/opdefs/iput_59.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iput_5a.d b/src/arch/dalvik/opdefs/iput_5a.d index 84ba41a..509868c 100644 --- a/src/arch/dalvik/opdefs/iput_5a.d +++ b/src/arch/dalvik/opdefs/iput_5a.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iput_5b.d b/src/arch/dalvik/opdefs/iput_5b.d index 628bfc2..9ad7500 100644 --- a/src/arch/dalvik/opdefs/iput_5b.d +++ b/src/arch/dalvik/opdefs/iput_5b.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iput_5c.d b/src/arch/dalvik/opdefs/iput_5c.d index 7121604..9ae86fa 100644 --- a/src/arch/dalvik/opdefs/iput_5c.d +++ b/src/arch/dalvik/opdefs/iput_5c.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iput_5d.d b/src/arch/dalvik/opdefs/iput_5d.d index 96ff6c0..8a3830e 100644 --- a/src/arch/dalvik/opdefs/iput_5d.d +++ b/src/arch/dalvik/opdefs/iput_5d.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iput_5e.d b/src/arch/dalvik/opdefs/iput_5e.d index 888ce46..5120675 100644 --- a/src/arch/dalvik/opdefs/iput_5e.d +++ b/src/arch/dalvik/opdefs/iput_5e.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/iput_5f.d b/src/arch/dalvik/opdefs/iput_5f.d index 5ed0a01..7fe2d80 100644 --- a/src/arch/dalvik/opdefs/iput_5f.d +++ b/src/arch/dalvik/opdefs/iput_5f.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_field } diff --git a/src/arch/dalvik/opdefs/new_22.d b/src/arch/dalvik/opdefs/new_22.d index 4c13f0e..4af913c 100644 --- a/src/arch/dalvik/opdefs/new_22.d +++ b/src/arch/dalvik/opdefs/new_22.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_type } diff --git a/src/arch/dalvik/opdefs/new_23.d b/src/arch/dalvik/opdefs/new_23.d index ab61cd4..0a6a863 100644 --- a/src/arch/dalvik/opdefs/new_23.d +++ b/src/arch/dalvik/opdefs/new_23.d @@ -25,6 +25,6 @@ @encoding() { - @format 22c + @format 22c | pool_type } diff --git a/src/arch/dalvik/opdefs/sget_60.d b/src/arch/dalvik/opdefs/sget_60.d index 803e09c..90090a2 100644 --- a/src/arch/dalvik/opdefs/sget_60.d +++ b/src/arch/dalvik/opdefs/sget_60.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sget_61.d b/src/arch/dalvik/opdefs/sget_61.d index 9681de3..c3f132c 100644 --- a/src/arch/dalvik/opdefs/sget_61.d +++ b/src/arch/dalvik/opdefs/sget_61.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sget_62.d b/src/arch/dalvik/opdefs/sget_62.d index 0a21e7c..97d41d9 100644 --- a/src/arch/dalvik/opdefs/sget_62.d +++ b/src/arch/dalvik/opdefs/sget_62.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sget_63.d b/src/arch/dalvik/opdefs/sget_63.d index f0d7ab7..0dca873 100644 --- a/src/arch/dalvik/opdefs/sget_63.d +++ b/src/arch/dalvik/opdefs/sget_63.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sget_64.d b/src/arch/dalvik/opdefs/sget_64.d index 7dc329e..507420e 100644 --- a/src/arch/dalvik/opdefs/sget_64.d +++ b/src/arch/dalvik/opdefs/sget_64.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sget_65.d b/src/arch/dalvik/opdefs/sget_65.d index 8336764..5236314 100644 --- a/src/arch/dalvik/opdefs/sget_65.d +++ b/src/arch/dalvik/opdefs/sget_65.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sget_66.d b/src/arch/dalvik/opdefs/sget_66.d index fc6440a..9f8b4fa 100644 --- a/src/arch/dalvik/opdefs/sget_66.d +++ b/src/arch/dalvik/opdefs/sget_66.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sput_67.d b/src/arch/dalvik/opdefs/sput_67.d index e7157a5..149337a 100644 --- a/src/arch/dalvik/opdefs/sput_67.d +++ b/src/arch/dalvik/opdefs/sput_67.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sput_68.d b/src/arch/dalvik/opdefs/sput_68.d index e6a8948..3709445 100644 --- a/src/arch/dalvik/opdefs/sput_68.d +++ b/src/arch/dalvik/opdefs/sput_68.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sput_69.d b/src/arch/dalvik/opdefs/sput_69.d index f41e84c..89302eb 100644 --- a/src/arch/dalvik/opdefs/sput_69.d +++ b/src/arch/dalvik/opdefs/sput_69.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sput_6a.d b/src/arch/dalvik/opdefs/sput_6a.d index 17aa26a..91f5f4f 100644 --- a/src/arch/dalvik/opdefs/sput_6a.d +++ b/src/arch/dalvik/opdefs/sput_6a.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sput_6b.d b/src/arch/dalvik/opdefs/sput_6b.d index 8aa83ef..72338a0 100644 --- a/src/arch/dalvik/opdefs/sput_6b.d +++ b/src/arch/dalvik/opdefs/sput_6b.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sput_6c.d b/src/arch/dalvik/opdefs/sput_6c.d index b863af4..1f0a7c5 100644 --- a/src/arch/dalvik/opdefs/sput_6c.d +++ b/src/arch/dalvik/opdefs/sput_6c.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } diff --git a/src/arch/dalvik/opdefs/sput_6d.d b/src/arch/dalvik/opdefs/sput_6d.d index 65ca067..d164858 100644 --- a/src/arch/dalvik/opdefs/sput_6d.d +++ b/src/arch/dalvik/opdefs/sput_6d.d @@ -25,6 +25,6 @@ @encoding() { - @format 21c + @format 21c | pool_field } |