You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build the main executable: gcc main.c -o bin/hashme -lm
Run the infect script (might have to adjust for libm location): python infect.py
Make hashme.obf executable: chmod +x bin/hashme.obf
Run bin/hashme.obf
Observe the error: bin/hashme.obf: symbol lookup error: bin/hashme.obf: undefined symbol: cos, version GLIBC_2.29
When opening the bin/hashme.obf file in IDA I get the following warning:
Unexpected entries in the PLT stub.
The file might have been modified after linking.
EDIT: Turns out this error is displayed in IDA even when opening the normal (unmodified) hashme executable, so it is unrelated to LIEF. Not sure why I get that warning but that doesn't seem relevant to the issue I have.
Expected behavior
I should still be able to run the main executable, as the tutorial shows.
Environment (please complete the following information):
System and Version : Ubuntu 22.04 in Docker, running on WLS2
Target format : ELF
LIEF commit version: 0.15.0-54d0a72c
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm doing the LIEF tutorial. I'm at 03 - Play with Elf, but after swapping the symbol names in the main executable and trying to run it I get:
./bin/hashme.obf: symbol lookup error: ./bin/hashme.obf: undefined symbol: cos, version GLIBC_2.2
To Reproduce
I have created a minimal reproducible example with a .devcontainer. But the python script is basically just a copy/paste from the tutorial:
main executable:
gcc main.c -o bin/hashme -lm
python infect.py
chmod +x bin/hashme.obf
bin/hashme.obf
bin/hashme.obf: symbol lookup error: bin/hashme.obf: undefined symbol: cos, version GLIBC_2.29
When opening thebin/hashme.obf
file in IDA I get the following warning:Unexpected entries in the PLT stub.The file might have been modified after linking.
EDIT: Turns out this error is displayed in IDA even when opening the normal (unmodified)
hashme
executable, so it is unrelated to LIEF. Not sure why I get that warning but that doesn't seem relevant to the issue I have.Expected behavior
I should still be able to run the main executable, as the tutorial shows.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: