-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
Create global variable from DWARF #3985
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much better now, thanks!
Please also add a test with a static variable defined inside a function with two cases:
int fn1(int a; int b) {
static char* bla = NULL;
....
bla = strdup("qwe");
}
int fn2(void *q, bool arg) {
const static float qwe = 30.0;
....
printf("qwe = %x\n", qwe);
}
Or something like that - with static
inside the function, and const static
too.
See also those 4 failed tests:
[XX] db/abi/compilers/gcc_64 ELF_ABI : gcc O0 dwarf info
RZ_NOPLUGINS=1 /usr/bin/rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -Qc 'id~?
' bins/abi_bins/elf/compilers/gcc/echo_gcc_O0
-- stdout
--- expected
+++ actual
@@ -1,1 +1,1 @@
-25945
+25948
[**] db/abi/compilers/gcc_64 13735 OK 904 BR 1 XX 22 FX
[XX] db/abi/compilers/clang ELF_ABI : Clang m32 O0 dwarf info
RZ_NOPLUGINS=1 /usr/bin/rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -Qc 'id~?
' bins/abi_bins/elf/compilers/clang/echo_clang_m32_O0
-- stdout
--- expected
+++ actual
@@ -1,1 +1,1 @@
-22327
+22330
-- stderr
ERROR: Global variable quoting_style_args at 0x804e2b4 already exists!
[**] db/abi/compilers/clang 13744 OK 904 BR 2 XX 22 FX
[XX] db/abi/compilers/clang_64 ELF_ABI : Clang O0 dwarf info
RZ_NOPLUGINS=1 /usr/bin/rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -Qc 'id~?
' bins/abi_bins/elf/compilers/clang/echo_clang_O0
-- stdout
--- expected
+++ actual
@@ -1,1 +1,1 @@
-22442
+22445
[**] db/abi/compilers/clang_64 13753 OK 904 BR 3 XX 22 FX
[XX] db/abi/compilers/gcc ELF_ABI : gcc m32 O0 dwarf info
RZ_NOPLUGINS=1 /usr/bin/rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -Qc 'id~?
' bins/abi_bins/elf/compilers/gcc/echo_gcc_m32_O0
-- stdout
--- expected
+++ actual
@@ -1,1 +1,1 @@
-25788
+25791
And (maybe unnecessary) error message:
[XX] db/rzil/ppc64 emulateme-little-endian
RZ_NOPLUGINS=1 /usr/bin/rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -T -Qc 's sym.decrypt
e bin.str.enc=utf8
ps @ obj.seckrit
aezi
o malloc://0x1000 0x400000
o malloc://0x10 0x500000
e io.cache=1
w AnyColourYouLike @ 0x500000
ar r1=0x400000
ar r3=0x500000
aezsu 0x001007f8
ps @ obj.seckrit
' bins/elf/ppc/emulateme-ppc64le
-- stderr
--- expected
+++ actual
@@ -1,3 +1,32 @@
+ERROR: Global variable lock at 0x1e29f8 already exists!
+ERROR: Global variable lock at 0x1e29f8 already exists!
+ERROR: Global variable step4_jumps at 0x194f40 already exists!
+ERROR: Global variable state at 0x1e7010 already exists!
+ERROR: Global variable state at 0x1e7010 already exists!
+ERROR: Global variable __elf_set___libc_subfreeres_element_free_mem__ at 0x1af8f8 already exists!
+ERROR: Global variable __elf_set___libc_subfreeres_element_free_mem__ at 0x1af8f8 already exists!
+ERROR: Global variable map at 0x1e7788 already exists!
If we can't avoid it - should be only a warning at most.
753e458
to
7980e8e
Compare
f46bfd8
to
8f9f3d6
Compare
i think those "dup" should be INFO |
@imbillow it affects loading the PE with debug symbols into Windows debugger:
|
Your checklist for this pull request
Detailed description
...
Test plan
...
Closing issues
closes #3984