a.out not in executable format: file format not recognised

Hi,
Please help me in debugging c code in gdb
  1. compiled c code in gcc wit -g option

  2. trying do debugging through gdb

but the following error:
BFD: /Users/vamsi/Documents/c_programs/a.out: unknown load command 0x32
BFD: /Users/vamsi/Documents/c_programs/a.out: unknown load command 0x32
"/Users/vamsi/Documents/c_programs/a.out": not in executable format: file format not recognized


GNU gdb (GDB) 8.2

gcc:


Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.4.0

unknown load command 0x32

In this context that likely means that your executable contains a LC_BUILD_VERSION load command, which your tooling doesn’t recognise. That command has been around since macOS 10.13, so this is a bit surprising. Regardless, you should escalate this via the support channel for your tools vendor.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Have you got any solution for this? I am also facing the same issue.

a.out not in executable format: file format not recognised
 
 
Q