Hello,
This may not be a problem in FPC but, just in case...
compile the following trivial file with debugging information (dwarf 2 with sets) obtaining a 64 bit executable:
{$APPTYPE CONSOLE}
program _HelloWorld;
begin
writeln('Hello world');
readln;
end.
executing the (presumed) current version (v2.39) of objdump --dwarf HelloWorld.exe causes objdump to declare "file format not recognized" while version 2.24 of objdump processes the file without complaint.
It seems likely that the problem resides in objdump.exe but, it is also possible that the problem may be in the way dwarf debugging information is structured. For this reason, I figured I'd mention the problem, just in case.
Also in case it might be useful, here is the output from v2.39 using that executable:
[D:\binutils-build\binutils\.libs]objdump.exe --dwarf h:\dev\Dwarf\Tests\HelloWorld\HelloWorld64d.exe
objdump.exe: h:\dev\Dwarf\Tests\HelloWorld\HelloWorld64d.exe: file format not recognized
[D:\binutils-build\binutils\.libs]objdump.exe --version
GNU objdump (GNU Binutils) 2.39
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
v2.24 of objdump processes the command without any complaints whatsoever.
NOTE: the result obtained is the same using v3.0.4 and v3.3.1 (trunk) of FPC thus further suggesting that the bug may be in objdump and not in FPC.