I was playing around trying to enable -gdwarf-5 in the Linux kernel, and hit an issue where it looks like clang is emitting .file directives like:
.file 1 "/home/nick/linux/init/do_mounts.c" md5 0x62e8a195aa9d4d8b466f84b7775ea4cd
with GAS producing errors like:
do_mounts.s:19: Error: junk at end of line, first unrecognized character is `m'
A quick grep through the DWARF-5 spec  doesn't mention anything about assembly directives. The docs on .file directives also doesn't mention this. 
I assume this is maybe an extension that Clang implemented? IIUC, it's used by debuggers to tell when/if a file has been modified.
Is this something that can be implemented in GNU as? I'm happy to also pursue a command line flag in Clang to disable the emission of these checksums.
See also .
Pawing more through the spec (previously linked), it looks like "1.4 Changes from Version 4 to Version 5" on pdf pg 26 kind of hints at this:
20 • Replace the line number program header format with a new format that
21 provides the ability to use an MD5 hash to validate the source file version in
22 use, allows pooling of directory and file name strings and makes provision
23 for vendor-defined extensions. Also add a string section specific to the line
24 number table (.debug_line_str) to properly support the common practice
25 of stripping all DWARF sections except for line number information.
Also, documentation here would have to be updated. https://sourceware.org/binutils/docs/as/File.html#File
OK, so this looks like it would be a useful extension to support.
I'll have a look at it in my copious free time (tm) unless of
course you want to have a go yourself ?
Support for this feature has now been added to the assembler: commit 5496f3c635
The master branch has been updated by Maciej W. Rozycki <firstname.lastname@example.org>:
Author: Maciej W. Rozycki <email@example.com>
Date: Tue Mar 31 23:01:36 2020 +0100
PR 25611, PR 25614: GAS: Remove a double inclusion of "bignum.h"
Correct an issue with commit 5496f3c635dc ("Add support for generating
DWARF-5 format directory and file name tables from the assembler.") and
remove a duplicate direct inclusion of "bignum.h" from dwarf2dbg.c that
causes a GAS compilation error:
In file included from .../gas/dwarf2dbg.c:33:
.../gas/bignum.h:42: error: redefinition of typedef 'LITTLENUM_TYPE'
.../gas/bignum.h:42: error: previous declaration of 'LITTLENUM_TYPE' was here
make: *** [dwarf2dbg.o] Error 1
with some GCC versions, as this header has been already included via
"as.h" and then "flonum.h".
* dwarf2dbg.c: Do not include "bignum.h".