mirror of
https://github.com/radareorg/radare2
synced 2026-08-22 20:23:32 -04:00
Fix zydis warnings
This commit is contained in:
parent
ba923859b7
commit
05726e9084
2 changed files with 137 additions and 0 deletions
|
|
@ -0,0 +1,132 @@
|
|||
diff --git a/amalgamated-dist/Zydis.c b/amalgamated-dist/Zydis.c
|
||||
index 66dcb1ed3d..388ef4f45b 100644
|
||||
--- a/amalgamated-dist/Zydis.c
|
||||
+++ b/amalgamated-dist/Zydis.c
|
||||
@@ -32564,7 +32564,6 @@ static const struct ZydisPredefinedTokenPREF_REX_4A_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_4A = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'w', 'x', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_4A = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4A;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4B = ZYDIS_MAKE_SHORTSTRING("rex.wxb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4B_
|
||||
@@ -32573,7 +32572,6 @@ static const struct ZydisPredefinedTokenPREF_REX_4B_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[14];
|
||||
} TOK_DATA_PREF_REX_4B = { 14, 12, { ZYDIS_TOKEN_PREFIX, 8, 'r', 'e', 'x', '.', 'w', 'x', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_4B = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4B;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4C = ZYDIS_MAKE_SHORTSTRING("rex.wr ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4C_
|
||||
@@ -32582,7 +32580,6 @@ static const struct ZydisPredefinedTokenPREF_REX_4C_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_4C = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'w', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_4C = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4C;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4D = ZYDIS_MAKE_SHORTSTRING("rex.wrb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4D_
|
||||
@@ -32591,7 +32588,6 @@ static const struct ZydisPredefinedTokenPREF_REX_4D_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[14];
|
||||
} TOK_DATA_PREF_REX_4D = { 14, 12, { ZYDIS_TOKEN_PREFIX, 8, 'r', 'e', 'x', '.', 'w', 'r', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_4D = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4D;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4E = ZYDIS_MAKE_SHORTSTRING("rex.wrx ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4E_
|
||||
@@ -32600,7 +32596,6 @@ static const struct ZydisPredefinedTokenPREF_REX_4E_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[14];
|
||||
} TOK_DATA_PREF_REX_4E = { 14, 12, { ZYDIS_TOKEN_PREFIX, 8, 'r', 'e', 'x', '.', 'w', 'r', 'x', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_4E = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4E;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_4F = ZYDIS_MAKE_SHORTSTRING("rex.wrxb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_4F_
|
||||
@@ -32609,7 +32604,6 @@ static const struct ZydisPredefinedTokenPREF_REX_4F_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[15];
|
||||
} TOK_DATA_PREF_REX_4F = { 15, 13, { ZYDIS_TOKEN_PREFIX, 9, 'r', 'e', 'x', '.', 'w', 'r', 'x', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_4F = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_4F;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_40 = ZYDIS_MAKE_SHORTSTRING("rex ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_40_
|
||||
@@ -32618,7 +32612,6 @@ static const struct ZydisPredefinedTokenPREF_REX_40_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[10];
|
||||
} TOK_DATA_PREF_REX_40 = { 10, 8, { ZYDIS_TOKEN_PREFIX, 4, 'r', 'e', 'x', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_40 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_40;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_41 = ZYDIS_MAKE_SHORTSTRING("rex.b ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_41_
|
||||
@@ -32627,7 +32620,6 @@ static const struct ZydisPredefinedTokenPREF_REX_41_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[12];
|
||||
} TOK_DATA_PREF_REX_41 = { 12, 10, { ZYDIS_TOKEN_PREFIX, 6, 'r', 'e', 'x', '.', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_41 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_41;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_42 = ZYDIS_MAKE_SHORTSTRING("rex.x ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_42_
|
||||
@@ -32636,7 +32628,6 @@ static const struct ZydisPredefinedTokenPREF_REX_42_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[12];
|
||||
} TOK_DATA_PREF_REX_42 = { 12, 10, { ZYDIS_TOKEN_PREFIX, 6, 'r', 'e', 'x', '.', 'x', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_42 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_42;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_43 = ZYDIS_MAKE_SHORTSTRING("rex.xb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_43_
|
||||
@@ -32645,7 +32636,6 @@ static const struct ZydisPredefinedTokenPREF_REX_43_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_43 = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'x', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_43 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_43;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_44 = ZYDIS_MAKE_SHORTSTRING("rex.r ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_44_
|
||||
@@ -32654,7 +32644,6 @@ static const struct ZydisPredefinedTokenPREF_REX_44_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[12];
|
||||
} TOK_DATA_PREF_REX_44 = { 12, 10, { ZYDIS_TOKEN_PREFIX, 6, 'r', 'e', 'x', '.', 'r', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_44 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_44;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_45 = ZYDIS_MAKE_SHORTSTRING("rex.rb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_45_
|
||||
@@ -32663,7 +32652,6 @@ static const struct ZydisPredefinedTokenPREF_REX_45_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_45 = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'r', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_45 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_45;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_46 = ZYDIS_MAKE_SHORTSTRING("rex.rx ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_46_
|
||||
@@ -32672,7 +32660,6 @@ static const struct ZydisPredefinedTokenPREF_REX_46_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_46 = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'r', 'x', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_46 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_46;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_47 = ZYDIS_MAKE_SHORTSTRING("rex.rxb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_47_
|
||||
@@ -32681,7 +32668,6 @@ static const struct ZydisPredefinedTokenPREF_REX_47_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[14];
|
||||
} TOK_DATA_PREF_REX_47 = { 14, 12, { ZYDIS_TOKEN_PREFIX, 8, 'r', 'e', 'x', '.', 'r', 'x', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_47 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_47;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_48 = ZYDIS_MAKE_SHORTSTRING("rex.w ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_48_
|
||||
@@ -32690,7 +32676,6 @@ static const struct ZydisPredefinedTokenPREF_REX_48_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[12];
|
||||
} TOK_DATA_PREF_REX_48 = { 12, 10, { ZYDIS_TOKEN_PREFIX, 6, 'r', 'e', 'x', '.', 'w', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_48 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_48;
|
||||
|
||||
static const ZydisShortString STR_PREF_REX_49 = ZYDIS_MAKE_SHORTSTRING("rex.wb ");
|
||||
static const struct ZydisPredefinedTokenPREF_REX_49_
|
||||
@@ -32699,7 +32684,6 @@ static const struct ZydisPredefinedTokenPREF_REX_49_
|
||||
ZyanU8 next;
|
||||
ZyanU8 data[13];
|
||||
} TOK_DATA_PREF_REX_49 = { 13, 11, { ZYDIS_TOKEN_PREFIX, 7, 'r', 'e', 'x', '.', 'w', 'b', '\0', ZYDIS_TOKEN_WHITESPACE, 0, ' ', '\0' } };
|
||||
-static const ZydisPredefinedToken* const TOK_PREF_REX_49 = (const ZydisPredefinedToken* const)&TOK_DATA_PREF_REX_49;
|
||||
|
||||
static const ZydisShortString STR_PREF_SEG_CS = ZYDIS_MAKE_SHORTSTRING("cs ");
|
||||
static const struct ZydisPredefinedTokenPREF_SEG_CS_
|
||||
|
|
@ -1,11 +1,16 @@
|
|||
.PHONY: zydis zydis_clean
|
||||
|
||||
ZYDIS_BUILD_CFLAGS=$(filter-out -Werror%,$(CFLAGS))
|
||||
ZYDIS_PATCHES=zydis-patches/unused-rex-token-aliases.patch
|
||||
|
||||
zydis:
|
||||
rm -rf zydis.tmp
|
||||
mkdir -p zydis.tmp
|
||||
cp -rf packagefiles/zydis/* zydis.tmp
|
||||
for a in ${ZYDIS_PATCHES}; do \
|
||||
echo "patch -d zydis.tmp -p1 < zydis.tmp/$$a" ; \
|
||||
patch -d zydis.tmp -p1 < zydis.tmp/$$a ; \
|
||||
done
|
||||
${CC} ${ZYDIS_BUILD_CFLAGS} -fPIC -DZYDIS_STATIC_BUILD -Izydis.tmp/amalgamated-dist -c zydis.tmp/amalgamated-dist/Zydis.c -o zydis.tmp/Zydis.o
|
||||
${AR} rcs zydis.tmp/libzydis.a zydis.tmp/Zydis.o
|
||||
rm -rf zydis
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue