I'm aware this topic has been asked, but I have followed the steps of each, and none seem to work.
I am currently attempting to understand the functionality of an executable in which I was not given source code for. This means I had no control over the compilation of it, etc. It is a ELF 64-bit LSB pie executable, ARM aarch64 file.
To do so, I thought back to my computer architecture course, where we learned how to step through a program using gdb. I am currently attempting to use this, but I am running into a strange error, something along the lines of this when I attempt to run within the gdb debugger:
/bin/bash: line 1: /home/ec2-user/filename: cannot execute: required file not found
I say "something along the lines of" because I have tried this in both an Ubuntu22 instance as well as an Amazon Linux instance. Both return their same flavors of the error above. I sanity tested with
gdb thisfiledoesnotexist
And gdb explicitly told me that the file did not exist immediately upon entering the debugger, whereas with filename, it only stated it when I attempted to run. I could set breakpoints and do what limited things you can do without a frame or a running program.
A few things to note:
dir /home/ec2-user
within the debuggerI tested on a bash-native date file, which did indeed work, so it's not that gdb is the issue.
This leads me to believe one of a few things:
Any help would really be appreciated!
ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64,
The problem (most likely) is that /system/bin/linker64
does not exist on your system.
This is possibly an Android binary (using Bionic libc
), and you are trying to run it on a "regular" Linux.
Searching for "run android app on linux" provides many possible answers, though I am not sure which one is most appropriate here.