-
Notifications
You must be signed in to change notification settings - Fork 953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue about Globalvariable names #636
Comments
My mistake, I wrongly paste the original output, the new is here:
|
Thank you. @PeterMatula, what do you think about this? |
Hi, I've tried the change in For example you can see the code taken from decompilation of bashbot sample in before modification: // --------------------- Global Variables ---------------------
int32_t g1 = 0; // ebp
int32_t g2 = 0; // ebx
int32_t g3 = 0; // edi
int32_t g4 = 0; // esi
int32_t g5 = 0; // esp
int32_t g6 = 0x200072;
char (*g7)[20] = "188.209.52.143:8080";
int32_t g8 = -1;
uint32_t g9 = 0x587c4;
int32_t g10 = 4095;
char * g11;
int32_t g12 = 0;
int32_t g13 = 0;
char * g14;
int32_t g15 = 0;
int32_t g16 = 0;
int32_t g17 = 0;
char * g18;
char g19 = 0;
char g20 = 0;
char g21 = 0;
char g22 = 0;
char g23 = 0;
int32_t g24 = 0;
int32_t g25 = 0;
int32_t g26 = 0;
int32_t g27;
int32_t g28; after modification: // --------------------- Global Variables ---------------------
int32_t g1 = 0; // eax
int32_t g2 = 0; // ebp
int32_t g3 = 0; // ebx
int32_t g4 = 0; // edi
int32_t g5 = 0; // esi
int32_t g6 = 0; // esp
int32_t g7 = -1; // 0x804f1e0
int32_t g8 = 0x200072; // 0x804f853
int32_t g9 = -1; // 0x8051058
bool g10 = true; // 0x8051060
int32_t g11 = 0; // 0x8051064
char (*g12)[20] = "188.209.52.143:8080"; // 0x8051260
int32_t g13 = -1; // 0x8051264
uint32_t g14 = 0x587c4; // 0x8051364
int32_t g15 = 4095; // 0x8051368
char g16 = 0; // 0x8051380
int32_t g17 = 0; // 0x8051384
char * g18; // 0x80513a0
int32_t g19 = 0; // 0x80513a8
int32_t g20 = 0; // 0x80513ac
char * g21; // 0x80513b0
int32_t g22 = 0; // 0x80513c0
int32_t g23 = 0; // 0x80513c4
int32_t g24 = 0; // 0x80513c8
char * g25; // 0x80553c0
char g26 = 0; // 0x80553c5
char g27 = 0; // 0x80553c6
char g28 = 0; // 0x80553c7
char g29 = 0; // 0x80553c8
char g30 = 0; // 0x80553c9
int32_t g31 = 0; // 0x80553cc
int32_t g32 = 0; // 0x80553d0
int32_t g33 = 0; // 0x80553d4
int32_t g34;
int32_t g35; |
Looks ok. Will you open a Pull Request, or should we do the change? No problem either way. |
Reference: avast#636
Fixed. Regression test added in avast/retdec-regression-tests@7523176. |
I use bin2llvmir to translate an ELF file and I get Globalvariables look like:
They have numbers in the terminal, it is because these Globalvariables are create in same names more than once. After looking into
bin2llvmir/utils/ir_modifier.cpp
file, I think I can add a single line of code and solve this problem. In functionIrModifier::getGlobalVariable
, and add a new piece of code after line687
:Then we can get:
The text was updated successfully, but these errors were encountered: