-bash: ./main: No such file or directory
readelfutility that displays information about ELF files (including the interpreter information) to resolve our issue.
readelf -l ./mainwhich displays the information contained in the file’s segment headers, if it has any.
--segments, they are the same).
From the data that was produced we only needed the following line:
[Requesting program interpreter: /lib/ld-linux-armhf.so.3]
grepto filter out all other lines and then
trto get the data after the
:character (second column) and then remove all spaces and the
]character from the result.
The full and final command we used was:
readelf -l ./main | grep 'Requesting' | cut -d':' -f2 | tr -d ' ]';