Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to find source file name from executable?

Tags:

c

linux

IN LINUX: Not sure if it is possible. I have 100 source file, and 100 respective executable files. Now, given the executable file, is it possible to determine, respective source file.

like image 220
Whoami Avatar asked Oct 15 '25 13:10

Whoami


1 Answers

I guess you can give this a try.

readelf -s a.out | grep FILE

I think you can add some grep and sed magic to the above command and get the source file name.

like image 54
Sangeeth Saravanaraj Avatar answered Oct 18 '25 07:10

Sangeeth Saravanaraj