Comments (9)
Its looking for stderr as an external symbol and can't find it. Create a definitions (e.g. std_defs.txt) with:
DATA: stderr 1
Use the -func-map argument with IDA/bin_descend.
The format for data entries is:
DATA: <symbol> <size of symbol in bytes>
from mcsema.
We tried both:
DATA: stderr 4
and
DATA: stderr 1
But either way we end up with:
Already have driver for: main
Inserted function: sub_8000000
inserting global data section named data_0x800007d
Adding entry point: mcsema_main
invalid linkage type for global declaration
i32* @stderr
Could not verify module!
or
Already have driver for: main
Inserted function: sub_8000000
inserting global data section named data_0x800007d
Adding entry point: mcsema_main
invalid linkage type for global declaration
i8* @stderr
Could not verify module!
from mcsema.
And peeping into the bytecode reveals:
declare i32 @stderr()
which doesn't look right...
from mcsema.
Hmm yes that does look bad. I'll investigate and see why its not processing it properly.
from mcsema.
I tripped across the same issue with stdout
, and tried DATA:
with similar lack of effect. (32-bit ELF) Presumably any .dynbss refs will have this glitch. My peeping (in gdb) suggests it is just being handled as uninitialized storage. Is there a workaround?
from mcsema.
Thanks for that tip. Let me look into this and see what special about .dynbss. I'm hoping its simply a case of handling R_386_COPY relocations...
from mcsema.
Hello, I am also having the same issue. Did you guys figure out the solution? If so, please share it with me so that I can make some progress with my work.
Thanks
from mcsema.
I'd have to see if this is fixed in the very latest merge to master. I remember attempting to fix it, but not sure if the fix made it.
The core issue is that stderr
is the first item in the start of a new section. IDA sees references to stderr
as references to the .data
section, and not to the external symbol named stderr
. The reference does not get correctly detected during CFG recovery, and therefore is not correctly emitted in the translated binary.
from mcsema.
@ianamason or @mcuramen Are you having this issue in the llvm38 branch? Make sure to read the README to see the new build and running process.
from mcsema.
Related Issues (20)
- Docker build error HOT 1
- dyninst frontend is not gettting built on Linux HOT 4
- Segfault while running lifted binary HOT 1
- How not to be explicit about "runtime's memory" HOT 4
- Decompiling Windows binaries (32bit and 64bit) does not work at all HOT 3
- Building mcsema with clang12 error HOT 10
- Official support for running mcsema with rizin/cutter HOT 2
- build error on ubuntu 20.04
- Dockerfile is not up-to-date with remill dependency HOT 2
- Feature request: Improve installation process with precompiled binaries HOT 1
- to see details in the generated 'xxx.cfg'
- fatal error: 'anvill/Program.h' file not found HOT 1
- Can you walk through the example on docs/McSemaWalkthrough.md and check if it still works?
- Unable to build the docker image
- error while translating function with function pointer as parameter HOT 5
- wsl-1.0 ubuntu20+win ida7.5 counter a error of
- Converting 64 bit program to 32 bit HOT 2
- Use mcsema with IDA Home
- Issue in disassembling binaries
- how to make llvm ir "store" volatile? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcsema.