0

When I cat a binary file like this cat /bin/cat, I see that something like this is included in binary almost every time;

GCC: (GNU) 4.6.3

And some other things like, .gnu.version.gnu.version_r or gnu.build-id.gnu.hash . Is there any reasons why these things are included in binary files?

yasar
  • 13,158
  • 28
  • 95
  • 160

1 Answers1

0

For debugging and compatibility purposes. You can use readelf to see this information in a more readable format (try readelf -V binaryFile). To get rid of some of the extra information, you can run the strip command.

As always, "man readelf" and "man strip" for more information!

Josh
  • 1,574
  • 1
  • 15
  • 36